chain<R> method

R chain<R>(
  1. R f(
    1. T value
    )
)

Pass the value into the given function.

123.chain(print);
// is the same as
print(123);

Implementation

R chain<R>(R Function(T value) f) => f(this);