
On 10 May 2009, at 04:00, Cory Knapp wrote:
... There have been 12 replies to this question, all of which say the same thing.
Brandon's one was different. And incorrect, which shows that this question isn't completely obvious.
I'm glad we're so happy to help, but does
Just 3 >>= return . (+1)
Need to be explained by 12 different people?
1) That's how mail lists work. 2) We are just happy that Michael finally managed to present code which passes the syntax checker. To Michael: no sarcasm here.
fmap ("trying to"++) $ Just "help" -- :D
Cory
Why doesn't this work?
Michael [michael@localhost ~]$ ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> Just 3 >>= (1+)
<interactive>:1:0: No instance for (Num (Maybe b)) arising from a use of `it' at <interactive>:1:0-14 Possible fix: add an instance declaration for (Num (Maybe b)) In the first argument of `print', namely `it' In a stmt of a 'do' expression: print it Prelude>
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe