3

The monadic (>>) :: Monad m => m a -> m b -> m b operator is well-known. I wonder what its name is.

  • In this Haskell tutorial and also in this one they call this operator a "then". It is a nice name, it makes perfect sense in terms of the do-notation. A minor downside is the collision with then of the ternary operator.
  • In my native Haskell tradition we call it a "усечённое связывание", translation being "truncated bind". It might be a little inconvenient in Russian as it sort of collides with the translation for "bind's section", but I do not see any similar issue in English. Does anyone use such a name or some similar one in English? A poetic way to put this would probably be a "frustum".

Does anyone use any other name for the operator? What is the preferred one?

Zhiltsoff Igor
  • 1,812
  • 8
  • 24
  • 9
    Everyone calls it `then`, yes: https://wiki.haskell.org/Pronunciation, https://stackoverflow.com/q/37136294/1048572, https://stackoverflow.com/q/7746894/1048572 – Bergi Apr 16 '21 at 09:41
  • 3
    I read it as "and then", to disambiguate. – Will Ness Apr 16 '21 at 15:36
  • "Sequence" is the name "then" is the pronunciation when reading code. – Thomas M. DuBuisson Apr 16 '21 at 16:30
  • 2
    @ThomasM.DuBuisson to be frank, I like "sequence" the least as there is another function called ["sequence"](https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-Traversable.html#v:sequence), which appears in monadic code frequently. Unlike others, this collision seems to be major. – Zhiltsoff Igor Apr 16 '21 at 17:17
  • 1
    The key is to distinguish it from `<*`, one way or another. I use "then" or "and then" for `>>` and `*>`, and "before" for `<*`. – dfeuer Apr 16 '21 at 22:25

1 Answers1

0

Let's call it "short fish". (Because >=> is the "fish", and >> is that with a shorter body.)

Or maybe "fsh", a "fish" without the internal part.

Since I've seen the (.).(.) operator called by a certain name, I might also suggest calling >> by another name which you may discover by browsing this post's editing history...

Another possibility is... the chicane operator.

Enlico
  • 23,259
  • 6
  • 48
  • 102