
21 Apr
2015
21 Apr
'15
7:16 a.m.
Hi, Looking at the definition of return function for a Monad, it is described as - return :: a -> m a However when I do - return (Just 3) The result is Just 3 and not Just (Just 3) If I understand the definition correctly (which doesn't seem to be the case) the return function should wrap the parameter (which in my case is 'Just 3') into the Maybe Monad and therefore should return me 'Just (Just 3)' Please can someone help explain. Thanks, Shishir Srivastava +44 (0) 750 127 5019