alsoIfTrue

inline fun Boolean.alsoIfTrue(block: () -> Unit): Boolean(source)

Executes the given block if this Boolean is true and returns this Boolean. Similar to also, but only executes the block when the Boolean is true.

Return

This Boolean value

Parameters

block

The function to execute if this Boolean is true