Convenience function for iterating while the result is Ok
authorKlaus Aehlig <aehlig@google.com>
Fri, 14 Jun 2013 15:42:15 +0000 (17:42 +0200)
committerKlaus Aehlig <aehlig@google.com>
Mon, 17 Jun 2013 14:36:42 +0000 (16:36 +0200)
commitb1c772fdd7ac5e294f2223b4f4761e9abf395951
tree8fe2e4cdb06191b15d66750e767f1825e06443b2
parentb74ebe4402ca4a2b2d9b225d75698c3bf96ecd40
Convenience function for iterating while the result is Ok

For a function f :: a -> GenericResult a, iterate it (in the sense of the
monad), until the result is Bad; return the list of values occurred.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
src/Ganeti/BasicTypes.hs