ScopeFunction<T> extension
Methods
-
also(void op(T it))
→ T
-
Calls the specified function
op
with this
value as its argument and returns this
value.
-
apply(void op())
→ T
-
Calls the specified function
op
with this
value as its receiver and returns this
value.
-
let<R>(R op(T it))
→ R
-
Calls the specified function
op
with this
value as its argument and returns its result.
-
run<R>(R op())
→ R
-
Calls the specified function
op
with this
value as its receiver and returns its result.
-
takeIf(bool test(T it))
→ T?
-
Returns
this
value if it satisfies the given predicate test
or null
if it doesn't.
-
takeUnless(bool test(T it))
→ T?
-
Returns
this
value if it does not satisfy the given predicate test
or null
if it does.