whenTrue

inline fun Boolean.whenTrue(block: (Boolean) -> Unit): Boolean

Executes the given block if the Boolean is true.

This function allows for chaining operations based on the Boolean's value.

Return

The original Boolean value.

Parameters

block

The function to execute if this Boolean is true. The Boolean itself is passed as an argument to the block.