Reference
Auto-generated API reference from nix-effects source.

Reduce

Stream reduction: fold, toList, length, sum, any, all.

all

Check if all elements satisfy a predicate.

all : (a -> bool) -> Computation (Step r a) -> Computation bool

any

Check if any element satisfies a predicate. Short-circuits on first match (via lazy evaluation).

any : (a -> bool) -> Computation (Step r a) -> Computation bool

fold

Left fold over a stream.

fold : (b -> a -> b) -> b -> Computation (Step r a) -> Computation b

length

Count the number of elements in a stream.

length : Computation (Step r a) -> Computation int

sum

Sum all numeric elements in a stream.

sum : Computation (Step r number) -> Computation number

toList

Collect all stream elements into a list.

toList : Computation (Step r a) -> Computation [a]