let<R> method

R let<R>(
  1. R op(
    1. T it
    )
)

Calls the specified function op with this value as its argument and returns its result.

Example:

int number = 5;
String result = number.let((it) => 'Number is $it');
print(result); // Output: Number is 5

Implementation

R let<R>(R Function(T it) op) => op(this);