foldFor
Fold over a chunk of rows, calling the supplied fold-like function on
each row as it is received. In case the cursor is exhausted, a
Left value is returned, otherwise a
Right value is
returned.
Fold over a chunk of rows from the given cursor, calling the supplied
fold-like function on each row as it is received. In case the cursor
is exhausted, a
Left value is returned, otherwise a
Right value is returned.
Fold over a chunk of rows, calling the supplied fold-like function on
each row as it is received. In case the cursor is exhausted, a
Left value is returned, otherwise a
Right value is
returned.
Build a (possibly infinite) forest from a list of seed values.
unfoldForest f seeds invokes
unfoldTree on each seed
value.
For a monadic version, see
unfoldForestM (depth-first) and
unfoldForestM_BF (breadth-first).
Monadic forest builder, in depth-first order.
Monadic forest builder, in breadth-first order.
See
unfoldForest for more info.
Implemented using an algorithm adapted from
Breadth-First
Numbering: Lessons from a Small Exercise in Algorithm Design, by
Chris Okasaki,
ICFP'00.
Create a forest from a value and an unfolding function.