Hiya!

I'd like to have SRFI 210 finalized soon. The only remaining issue is the naming/argument order of "compose", which should be compatible with prior work but should also be in line with SRFI 189.

Therefore, I want to resurrect this thread. Do you have further suggestions? Or do you some opinion about the list of alternative names I gave?

Thanks,

Marc

Am Sa., 5. Dez. 2020 um 10:05 Uhr schrieb Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de>:
I agree that "compose" has too many prior uses with a right-to-left application order, so SRFI 210 and SRFI 189 (and John's upcoming monad proposal) should find an alternative name for the left-to-right application order.

Personally, I don't like "compose>>" because it doesn't look like a very Scheme-like name.  

Some more ideas (haven't thought yet about what would be my favorite or whether there is one):

- rcompose
- compose*
- transduce
- pass
- xcompose
- compose-right
- chain
- bind-lambda
- concat
- join
- juxtapose
- ???

Am Sa., 5. Dez. 2020 um 09:02 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
Regarding compose: Haskell has >=> vs <=<, and Elm has >> vs <<.   How about compose>> for the left-to-right application?

On Fri, Dec 4, 2020 at 8:07 PM Shiro Kawai <xxxxxx@gmail.com> wrote:


On Fri, Dec 4, 2020 at 8:16 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

Instead of "expression-arity", I would suggest

"coarity" (as the dual to "arity")

+1 

I would say that restricting a procedure named "identity" to just one value is not the right thing. (As you said, a single-valued version can be helpful for some optimizations, but I wouldn't call it identity.)

One reason why I added the name "identity" was to document that a portable procedure named "identity" should accept an arbitrary number of arguments.

Now I tend to agree.  And it doesn't really conflict with 1-1 identity but just a natural extension... probably I should come up with more sophisticated optimization for 'values' so that it doesn't need to put such artificial restrictions.

I'm still unsure whether we need an alias of 'values', though.

That's a very unfortunate name-clash. SRFI 210's compose is, of course, a monadic composition much like SRFI 189's maybe-compose (we are talking about the identity monad in the context of SRFI 210). So we should simultaneously change both SRFI 210's and SRFI 189's names for the from-left-to-right composition procedures.

(Added John and Wolfgang as addressees because they created SRFI 189.)

Do you have a good alternative name?

The discussion of John in another reply does have a point; the term 'compose' can be used either way.   But we do want to avoid the same name used differently if possible.

For the two argument case, I feel ((compose f g) x) == f(g(x))  has somewhat been established (e.g. SICP uses it).  Extending it to more than two procedures and arbitrary arity naturally follows.  I also found Racket uses this order.   If we can come up with a different name for the left-to-right order it would be the best.