reject() Function

Calls a predicate for each item in a list, rejects any items for which the returned value is true, and returns all remaining items.


reject( predicate, list, [context, … ] )

predicate: (Function, Rule, or Data Type Constructor) Expression that returns a Boolean (true or false).

list: (Any Type Array) List of elements that the predicate iterates through.

context: (Any Type Array) Variable number of parameters passed directly into each function evaluation.


Any Type Array


Use fn!functionName to reference an expression function and rule!ruleName to reference a rule.

a!forEach() cannot be used within rules used in this function.


You can experiment with this function in the test box below.

Test Input

reject(fn!isnull, {1, null(), 3}) returns 1, 3

Open in Github Built: Fri, Dec 03, 2021 (02:36:41 PM)

On This Page