let<R> method
R
let<R>(
- R block(
- T it
Executes block with this as the argument and returns the result.
Useful for inline transformations without intermediate variables:
final length = fetchValue().let((v) => v.toString().length);
Implementation
R let<R>(R Function(T it) block) => block(this);