3 ms·
It should probably have been called 'unit' or 'pure' as it was in Wadler's original Monad/Haskell papers. I don't know who decided that confusing legions of fu
by pja 12y ago
It should probably have been called 'unit' or 'pure' as it was in Wadler's original Monad/Haskell papers.
I don't know who decided that confusing legions of future programmers with the name 'return'; using do notation to carry out sequential programming in the IO Monad made calling it return too tempting I guess, even though it's a misleading name for all the other Monads.
Edit: A quick spelunk through the Haskell literature suggests that John Launchbury is probably to blame. His paper "Lazy Imperative Programming" appears to introduce both return and do-notation.