... There have been 12 replies to this question, all of which say the same thing. I'm glad we're so happy to help, but does

Just 3 >>= return . (+1)

Need to be explained by 12 different people?

fmap ("trying to"++) $ Just "help"  -- :D

Cory
Why doesn't this work?

Michael
[mich...@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

Reply via email to