haskell - Heritage of the names of the monad operators -


i'm reading on category theory basics , try make sense of names haskell assigns monad operations, semantically.

all material i've come through refers return unit map , join multiplication map (i'm ok name "join"). >>= or bind haven't (yet) found name common in math. rather i've come across flipped form, lift or -*, in turn makes sense me.

actual questions (tldr):

  1. why "return" used instead of "unit"?
  2. why "bind" coined nomenclature?
  3. is there name "bind" in math world?
  4. what semantics names "bind" , "return" should imply?

both names come programming, rather math. return, being used last statement of do expression, makes imperative: do {do_something; return result}. bind's name comes do translation: action >>= \x -> something translates do {x <- action; something}, looks x bound value returned action.

as bind's analog in math world, google "kleisli triple".


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -