
10 Jun
2010
10 Jun
'10
6:57 p.m.
2010/6/10 Günther Schmidt
Hi everyone,
I'm about to write a rather lengthy piece of IO code. Depending on the results of some of the IO actions I'd like the computation to stop right there and then.
What's wrong with a mere if/else condition? foo = do bar x <- mu case x of Bar -> return () Mu -> do y <- zot case y of Zot -> return () Foo -> gud foo = do bar x <- mu y <- bar when (pred x y) $ do zot x Continuations are risky for causing confusion of readers (and the author herself), do you definitely need this?