Skip to content

Function3Ops<T0, T1, T2, T3>

extension Function3Ops<T0, T1, T2, T3> on T3 Function(T0, T1, T2)

Provides additional functions on functions with 3 parameters.

Properties

curried extension no setter

T3 Function(T2) Function(T1) Function(T0) get curried

Return the curried form of this function.

Available on Function3<T0, T1, T2, T3>, provided by the Function3Ops<T0, T1, T2, T3> extension

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

tupled extension no setter

T3 Function(Record) get tupled

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

Available on Function3<T0, T1, T2, T3>, provided by the Function3Ops<T0, T1, T2, T3> extension

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

Methods

andThen() extension

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

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

Available on Function3<T0, T1, T2, T3>, provided by the Function3Ops<T0, T1, T2, T3> extension

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

compose() extension

T3 Function(T4) compose<T4>(Record Function(T4) fn)

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

Available on Function3<T0, T1, T2, T3>, provided by the Function3Ops<T0, T1, T2, T3> extension

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