This is partly genuine curiosity, and partly a check on my understanding. I'm probably missing the point.
In Haskell, why does a monad use operations called return
or unit
to describe putting a type into the container -- lifting it into the monadic space? It seems more intuitive to call the operation lift
.
Right now, in my (probably incorrect) port of monads into my own project, I'm using (pseudocode):
MyThing.lift(x).bind(f)...
rather than
MyThing.unit(x).bind(f)...
because it's more intuitive for me to think of lifting x into the monadic space.
Is that wrong-headed? I keep getting burned by not thinking abstractly enough, and I suspect that's the case again.
lift
is usually reserved for the idea of lifting functions into the world of monads, ieliftM :: Monad m => (a -> b) -> (m a -> m b)
.