let<R> method
R
let<R>(
- R block(
- T
Calls block with this value and returns the result.
Useful for transforming a value inline without a temporary variable.
'hello'.let((s) => s.toUpperCase()) // 'HELLO'
user.let((u) => u.name) // user.name
Implementation
R let<R>(R Function(T) block) => block(this);