1 Sep
2013
1 Sep
'13
4:03 a.m.
You can use the EitherT monad with IO and use the 'left' function which is just 'fail' to return early if you aren't restricted to only use the IO monad. Sent from my iGNU On 31. aug. 2013, at 20.05, Nathan Hüsken <nathan.huesken@posteo.de> wrote:
Hey,
Is it somehow possible to return "early" in a do block of the IO monad? The eqivalent do in C:
void doBlock() { if (some preCondition) { return; } ... }
???
Thanks! Nathan
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners