ifFalse

inline fun <T> Boolean.ifFalse(block: () -> T): T?(source)

Alias for letIfFalse. Executes the given block and returns its result if this Boolean is false.

Return

The result of block if false, null otherwise

Parameters

block

The function to execute if this Boolean is false

Type Parameters

T

The return type of the block