
13 Feb
2003
13 Feb
'03
9:45 a.m.
On Thursday, February 13, 2003 8:33 AM, Arjan van IJzendoorn [SMTP:afie@cs.uu.nl] wrote:
Not with the syntactic sugar of 'if'. But you can write [warning: untested code ahead]
ifM :: IO Bool -> IO a -> IO a -> IO a ifM test yes no = do b <- test if b then yes else no
I had ifM :: Monad m => m Bool -> m a -> m a -> m a ifM tst thn els = do b <- tst if b then thn else els And I just tested it. ---- Kevin S. Millikin Architecture Technology Corporation Research Scientist Specialists in Computer Architecture kmillikin@atcorp.com http://www.atcorp.com
8132
Age (days ago)
8132
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kevin Millikin