Kotlin HashSet takeWhile()
Syntax & Examples


Syntax of HashSet.takeWhile()

The syntax of HashSet.takeWhile() extension function is:

fun <T> Iterable<T>.takeWhile( predicate: (T) -> Boolean ): List<T>

This takeWhile() extension function of HashSet returns a list containing first elements satisfying the given predicate.