extensions/functions library

Functions

when<R>(bool condition, FunctionCallback<R> function) → R?
whenNotNull<I, O>(I? input, FunctionFactory<I, O> function) → O?
whenNull<I, O>(I? input, FunctionFactory<I, O> function) → O?

Typedefs

FunctionCallback<R> = R Function()
FunctionFactory<T, R> = R Function(T value)
FunctionIndexedFactory<T, R> = R Function(int index, T value)
Predicate<T> = bool Function(T value)
Transformer<T> = T Function(T value)