take multimethod

Methods

take(something:Eachable1, predicate:Any)experimental Source: stdlib.ngs:487
EXPERIMENTAL! Do not use!

Example

[1,2,3,1,2].take(X<3)  # [1,2]
take(i:Iter, n:Int) Source: autoload/Iter.ngs:82
Fetch and convert to array next n values from iterator i.

Example

i = Iter([10,20,30])
echo(i.take(2))  # Output: [10,20]