compose<T, M, R> function
R Function(T)
compose<T, M, R>(
- R f(
- M
- M g(
- T
Returns the mathematical composition f(g(x)): applies g first, then f.
Example:
final f = compose<int, int, String>((m) => 'v$m', (t) => t + 1);
f(2); // 'v3'
Implementation
R Function(T) compose<T, M, R>(R Function(M) f, M Function(T) g) =>
(T x) => f(g(x));