object/pipe_compose_utils
library
Functions
-
compose<T, M, R>(R f(M), M g(T))
→ R Function(T)
-
Returns the mathematical composition
f(g(x)): applies g first, then f.
-
once(void block())
→ void Function()
-
Returns a callable that runs
block only on its first invocation and is a
no-op thereafter. Useful for one-time initialization guards.
-
pipe<T, R>(List<R Function(dynamic)> fns)
→ R Function(T)
-
Pipe (chain unary functions). Compose (f(g(x))). Once (run block only once). Roadmap #246-248.
Builds a function that threads its input left-to-right through
fns,
passing each result to the next. Throws a StateError if the final value
is not assignable to R.