[Haskell-beginners] Early return in IO monad

Nathan Hüsken nathan.huesken at posteo.de
Sat Aug 31 20:05:26 CEST 2013


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




More information about the Beginners mailing list