ScopeFunction<T> extension

on
  • T

Methods

also(void op(T it)) → T

Available on T, provided by the ScopeFunction extension

Calls the specified function op with this value as its argument and returns this value.
apply(void op()) → T

Available on T, provided by the ScopeFunction extension

Calls the specified function op with this value as its receiver and returns this value.
let<R>(R op(T it)) → R

Available on T, provided by the ScopeFunction extension

Calls the specified function op with this value as its argument and returns its result.
run<R>(R op()) → R

Available on T, provided by the ScopeFunction extension

Calls the specified function op with this value as its receiver and returns its result.
takeIf(bool test(T it)) → T?

Available on T, provided by the ScopeFunction extension

Returns this value if it satisfies the given predicate test or null if it doesn't.
takeUnless(bool test(T it)) → T?

Available on T, provided by the ScopeFunction extension

Returns this value if it does not satisfy the given predicate test or null if it does.