News for hackers. Stuff that matters.
Re:Monoids, Functors, Applicatives, and Monads: Main Ideas by ky3 on Monday January 05, 2015 @09:32AM (#8838919)
Yes, 'return' is egregious. I believe it was co-designed with haskell's do-notation. So that you could write purely declarative code that was a spitting image of the imperative equivalent.

E.g.

    x <- foo 2      -- x = foo(2)
    y <- bar 4      -- y = bar(4)
    return (x+y)    -- return (x+y)
But something that's always missing in such discussions is that haskell allows you to define

    a_better_word = return
and then you can freely forget about 'return' in your own code, except when you roll your own monad instances, which is rarer than a blue moon.
Re:Monoids, Functors, Applicatives, and Monads: Main Ideas by dllthomas on Monday January 05, 2015 @01:24PM (#8840217)
With AMP, it should always be possible to use pure in place of return.

https://www.haskell.org/haskellwiki/Functor-Applicative-Mona...