Skip to content

Function4Ops<T0, T1, T2, T3, T4>

extensionFunction4Ops<T0, T1, T2, T3, T4>onT4Function(T0,T1,T2,T3)

Provides additional functions on functions with 4 parameters.

Properties

curried extension no setter

T4Function(T3)Function(T2)Function(T1)Function(T0)getcurried

Return the curried form of this function.

Available on Function4<T0, T1, T2, T3, T4>, provided by the Function4Ops<T0, T1, T2, T3, T4> extension

Implementation
dart
Function4C<T0, T1, T2, T3, T4> get curried =>
    (t0) => (t1) => (t2) => (t3) => this(t0, t1, t2, t3);

tupled extension no setter

T4Function(Record)gettupled

Returns a function that takes a tuple of parameters rather than individual parameters.

Available on Function4<T0, T1, T2, T3, T4>, provided by the Function4Ops<T0, T1, T2, T3, T4> extension

Implementation
dart
Function1<(T0, T1, T2, T3), T4> get tupled => (t) => t(this);

Methods

andThen() extension

T5Function(T0,T1,T2,T3)andThen<T5>(T5Function(T4)fn)

Composes this function with the provided function, this function being applied first.

Available on Function4<T0, T1, T2, T3, T4>, provided by the Function4Ops<T0, T1, T2, T3, T4> extension

Implementation
dart
Function4<T0, T1, T2, T3, T5> andThen<T5>(Function1<T4, T5> fn) =>
    (t0, t1, t2, t3) => fn(this(t0, t1, t2, t3));

compose() extension

T4Function(T5)compose<T5>(RecordFunction(T5)fn)

Composes this function with the provided function, this function being applied first.

Available on Function4<T0, T1, T2, T3, T4>, provided by the Function4Ops<T0, T1, T2, T3, T4> extension

Implementation
dart
Function1<T5, T4> compose<T5>(Function1<T5, (T0, T1, T2, T3)> fn) => (t5) => tupled(fn(t5));