Function2Ops<T0, T1, T2>
extensionFunction2Ops<T0, T1, T2>onT2Function(T0,T1)
Provides additional functions on functions with 2 parameters.
Properties
curried extension no setter
T2Function(T1)Function(T0)getcurried
Return the curried form of this function.
Available on Function2<T0, T1, T2>, provided by the Function2Ops<T0, T1, T2> extension
Implementation
dart
Function2C<T0, T1, T2> get curried => (t0) => (t1) => this(t0, t1);tupled extension no setter
T2Function(Record)gettupled
Returns a function that takes a tuple of parameters rather than individual parameters.
Available on Function2<T0, T1, T2>, provided by the Function2Ops<T0, T1, T2> extension
Implementation
dart
Function1<(T0, T1), T2> get tupled => (t) => t(this);Methods
andThen() extension
T3Function(T0,T1)andThen<T3>(T3Function(T2)fn)
Composes this function with the provided function, this function being applied first.
Available on Function2<T0, T1, T2>, provided by the Function2Ops<T0, T1, T2> extension
Implementation
dart
Function2<T0, T1, T3> andThen<T3>(Function1<T2, T3> fn) => (t0, t1) => fn(this(t0, t1));compose() extension
T2Function(T3)compose<T3>(RecordFunction(T3)fn)
Composes this function with the provided function, this function being applied first.
Available on Function2<T0, T1, T2>, provided by the Function2Ops<T0, T1, T2> extension
Implementation
dart
Function1<T3, T2> compose<T3>(Function1<T3, (T0, T1)> fn) => (t3) => tupled(fn(t3));