[Haskell-cafe] Equivalent of if/then/else for IO Bool?

Jason Dagit dagit at eecs.oregonstate.edu
Fri Nov 24 04:15:12 EST 2006


On 11/23/06, Conor McBride <ctm at cs.nott.ac.uk> wrote:
>
> *Grr> ifM (Just True) (Just 3) Nothing
> Nothing
>
> More care required!

Thank you.  Now that you point this out I recall that I've made this
mistake in the past with (&&), I once wrote something like liftM2
(&&).  I forget that the liftM* family binds the parameters before
passing them on.  Hopefully the lesson will stick this time.

Jason


More information about the Haskell-Cafe mailing list