[Haskell-cafe] Using the ContT monads for early exits of IO ?

Günther Schmidt gue.schmidt at web.de
Thu Jun 10 19:22:27 EDT 2010

Hi Christopher,

there is nothing wrong with ifs as such except the won't actually exit a 
long piece of code, the computation will continue, just in a useless way.

Primarily for every "if" I need two forks, so at every "if" the branches 

I have written the previous code with ifs and it's quite spaghetti-ish 
and I hope that using callCC here helps to avoid it.

Of course there is no guarantee that it actually will. ;)


More information about the Haskell-Cafe mailing list