partition multimethod

Methods

partition(something:Eachable1, predicate:Any) Source: stdlib.ngs:350
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

somethingEachable1

Returns

Array with two arrays in it

Example

partition([1,10,2,20], X>=10)  # [[10, 20], [1, 2]]