takeWhile

inline fun takeWhile(predicate: (Long) -> Boolean): LongList(source)

Returns a new LongList containing the first elements that satisfy the given predicate.

Return

A LongList containing the initial contiguous elements matching predicate.

Parameters

predicate

Function that tests each element for a condition.