Creates a generator that yields values from the source iterable as long as the predicate returns true.
The type of elements in the source iterable.
Function that tests each element and its index, returning a boolean.
A generator function that takes an iterable and yields elements until the predicate returns false.
Elements from the source iterable as long as the predicate returns true.
G.pipe( [1, 2, 3, 4, 5, 1, 2], G.while_(x => x < 4), G.array) // [1, 2, 3] Copy
G.pipe( [1, 2, 3, 4, 5, 1, 2], G.while_(x => x < 4), G.array) // [1, 2, 3]
Creates a generator that yields values from the source iterable as long as the predicate returns true.