ifNotEmpty

inline fun <T> Collection<T>?.ifNotEmpty(block: Collection<T>.() -> Unit): Collection<T>?

Invokes the given block if the receiver is not empty.

Return

The collection itself.

Parameters

T

The value type of the collection.

block

The block to invoke.