Methods

rejectΒΆ

reject(something:Eachable, predicate:Any)

Filter something to an Arr (array) of values using predicate
Source: stdlib.ngs:302

something

Instance of any type that has each(something, callback) implemented

predicate

Decision function to be called with each item as first argument. When predicate(item) returns true, the item will not appear in the resulting array

Returns

Arr

Example

(1...10).reject(F(num) num % 2 == 0)  # Gives [1,3,5,7,9]
(1...10).reject(X<5)  # Gives [5,6,7,8,9,10], predicate called as predicate(item, 5)