Legacy of monad operator names

I am currently reading the basics of category theory and trying to understand the names that Haskell assigns to monads semantically.

All the material I received relates to return as a device map, and join to a multiplication map (I'm fine with the name "join"). For >>= or bind I have not even found a name that is common in mathematics. Rather, I came across its inverted form, lift or - *, which in turn makes sense to me.

Hot Topics (TL; DR):

  • Why was “return” used instead of “unit”?
  • Why was “snapping” introduced as an item?
  • Is there a name for binding in the mathematical world?
  • What is semantics, should the names "bind" and "return" mean?
+6
source share
1 answer

Both names come from programming, not from mathematics. return , used as the last expression of the do statement, makes it very important: do {do_something; return result} do {do_something; return result} . bind name comes from the translation do : action >>= \x -> something translates to do {x <- action; something} do {x <- action; something} that looks like x bound to the value returned from action .

Regarding the bind analog in the mathematical world, google "Kleisli triple".

+9
source

Source: https://habr.com/ru/post/971430/


All Articles