partition multimethod
Methods
- partition(something:Eachable1, predicate:Any) Source: stdlib.ngs:328
Partition elements in something according to the predicate into two arrays. First array contains all elements for which predicate(elt) is true and the second array contains all elements for which predicate(elt) is false. Parameters
something Eachable1 Returns
Array with two arrays in itExample
partition([1,10,2,20], X>=10) # [[10, 20], [1, 2]]