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):
- why "return" used instead of "unit"?
- why "bind" coined nomenclature?
- is there name "bind" in math world?
- 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
Post a Comment