You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


The function returns a NUMBER LIST in l that validate predicate.

Argument predicate is a boolean expression, where ^ is used for referencing numeric values in argument l.

Syntax
filterByPredicate(number list l, boolean expression predicate) #Output: Number list
Examples
Parser expressionDescription
filterByPredicate([1, 2, 3, 4], ^ > 2)

The function returns a NUMBER LIST of values greater than 2 : [3, 4]

filterByPredicate([1, 2, 3, 4], remainder(^, 2) = 0) 

The function returns a NUMBER LIST of even values : [2, 4]

Additional information

Parameters used in this function

ParameterInput (data type)Description
<parameter>

DATA TYPE

Parameter description.
<parameter>

DATA TYPE

Parameter description.
Output

The function returns a NUMBER LIST