Which canonical name for the applicative `apply` operator?

84 views
Skip to first unread message

Sebastian Graf

unread,
Feb 27, 2015, 6:36:23 PM2/27/15
to elm-d...@googlegroups.com

Since there was recent discussion about a canonical name for the apply operator, I’d like to hear your suggestions.

I’m opening up a new thread because realistically, andThen won’t go anywhere and is quite a fine name in my opinion.

But whatever, this is not in any way an official poll, rather I just find myself brainstorming what a good name would be.

I’m planning a writeup in a gist.
I’ll later add some pros and cons I think. Keep in mind that this may be very subjective, so let me know if you disagree with some points I note!
If our taste diverges too much on a particular point, I’ll mark it as such or delete it.

So to make a start, I added some alternatives already mentioned in the aforementioned thread and elaborated on my own current favorite: andAlso.

Apart from suggesting names, you could also suggest criteria. Here is a list of what I tried (will try) to evaluate against.

I don’t have any collaborative experience with gists, but either PR the gist or post your suggestions here.
Let’s have some organized thoughts!

Some references:


Joey Eremondi

unread,
Feb 27, 2015, 6:48:04 PM2/27/15
to elm-d...@googlegroups.com
I loved `andMap`. The chains of
f `map` g `andMap` h ...
seemed really nice.

It establishes its connection to map, and also its connection to andThen. The and implies that its' sequencing, and that it's something you can use over and over again, which you can. The map implies that there's some sort of lifting going on, which there is.

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kaspar Emanuel

unread,
Feb 27, 2015, 6:53:20 PM2/27/15
to elm-d...@googlegroups.com

On 27 February 2015 at 23:48, Joey Eremondi <joey.e...@gmail.com> wrote:
I loved `andMap`. The chains of
f `map` g `andMap` h ...
seemed really nice.

It establishes its connection to map, and also its connection to andThen. The and implies that its' sequencing, and that it's something you can use over and over again, which you can. The map implies that there's some sort of lifting going on, which there is.


I agree and the previous discussion convinced me to start using it in my own code.

I filled in the pros and cons for it: https://gist.github.com/kasbah/2784affbaeba9be89769

Jeff Smits

unread,
Feb 28, 2015, 5:23:02 AM2/28/15
to elm-discuss
I doubt it will surprise people that I prefer andMap :) I do wonder a bit about how it will look when you use it in isolation. But I think all proposals suffer a little there, I'm not sure there is a good solution there.
Reply all
Reply to author
Forward
0 new messages