let<R> method

R let<R>(
  1. R transform(
    1. T
    )
)

Kotlin-esque "operator" to execute transform on this. Allows ?.let(...) instead of if (something != null) something."transform" in case the latter reads worse.

Implementation

R let<R>(R Function(T) transform) => transform(this);