[Haskell-cafe] Just 3 >>= (1+)?

Henning Thielemann lemming at henning-thielemann.de
Sat May 9 16:21:21 EDT 2009


On Sat, 9 May 2009, michael rice wrote:

> Prelude> Just 3 >>= (1+)

fmap (1+) (Just 3)

or

Just 3 >>= return . (1+)

or, with consistent order of functions

return . (1+) =<< Just 3


More information about the Haskell-Cafe mailing list