ObjectExtensions<T> extension

Object helpers (Kotlin-style scope functions).

on
  • T

Methods

also(void block(T)) → T

Available on T, provided by the ObjectExtensions extension

Runs block with this, then returns this.
let<R>(R block(T)) → R

Available on T, provided by the ObjectExtensions extension

Calls block with this as argument and returns the result.
run<R>(R block(T)) → R

Available on T, provided by the ObjectExtensions extension

Runs block with this and returns the result (alias of let).