
14 Mar
2011
14 Mar
'11
1:27 p.m.
If you have only one alternative, then you can simply do:
Opt1 <- someIO
E.g., if you are _sure_ that foo returns always a 'Just' within a monad you can perfectly do :
Just x <- foo
That's interesting. I had no idea that one could do that. I think what I'm looking for is something along the lines of lambda-case, but thanks for the tip.