StandardKt<T> extension

on
  • T
Annotations
  • @experimental

Methods

also(void block(T)) → T
Calls the specified function block with this value as its argument and returns this value.
let<R>(R block(T)) → R
Calls the specified function block with this value as its argument and returns its result.
takeIf(bool predicate(T)) → T?
Returns this value if it satisfies the given predicate or null, if it doesn't.
takeUnless(bool predicate(T)) → T?
Returns this value if it does not satisfy the given predicate or null, if it does.