whenNotEmpty

inline fun <T> List<T>?.whenNotEmpty(block: (List<T>) -> Unit)

Executes the given block if this nullable list is not null and not empty.

Parameters

block

The block of code to execute with this non-empty list as its argument.