while package:monad-loops
As long as the supplied
Maybe expression returns "Just _", the
loop body will be called and passed the value contained in the
Just. Results are collected into a list.
As long as the supplied
Maybe expression returns "Just _", the
loop body will be called and passed the value contained in the
Just. Results are collected into an arbitrary MonadPlus
container.
As long as the supplied
Maybe expression returns "Just _", the
loop body will be called and passed the value contained in the
Just. Results are discarded.
Execute an action repeatedly as long as the given boolean expression
returns True. The condition is evaluated before the loop body.
Collects the results into a list.
Execute an action repeatedly as long as the given boolean expression
returns True. The condition is evaluated before the loop body.
Collects the results into an arbitrary
MonadPlus value.
Execute an action repeatedly as long as the given boolean expression
returns True. The condition is evaluated before the loop body.
Discards results.
Execute an action repeatedly until its result fails to satisfy a
predicate, and return that result (discarding all others).
Repeatedly evaluates the second argument until the value satisfies the
given predicate, and returns a list of all values that satisfied the
predicate. Discards the final one (which failed the predicate).
Repeatedly evaluates the second argument until the value satisfies the
given predicate, and returns a
MonadPlus collection of all
values that satisfied the predicate. Discards the final one (which
failed the predicate).