News for hackers. Stuff that matters.
Re:The Day Python Embarassed Imperative Programming by JadeNB on Monday February 27, 2012 @04:41PM (#3640778)
Shouldn't `hamon2` be

    hamon2 f (Just x) = f x
    hamon2 f Nothing  = Nothing
? The author's definition doesn't seem to typecheck if `f :: a -> Maybe b` (as in `(>>=)`).

EDIT: Ah, I see; looking at the blackboard picture suggests that the author has confused `(>>=) :: Monad m => m a -> (a -> m b) -> m b` with `fmap :: Functor m => (a -> b) -> m a -> m b`.

There are no comments on this comment yet.