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

Compare with Current View Page History

« Previous Version 7 Next »


Supported list types

Number list

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


Text list

Returns a TEXT LIST with texts in l that validate predicate. Argument predicate is a boolean expression, where ^% is used for referencing string values in argument l.

Syntax
filterByPredicate(string list l, boolean expression predicate) #Output: Text list
Examples
Parser expressionDescription
filterByPredicate(["book", "rose", "sword"], length(^%) > 4)

The function returns a TEXT LIST : ["sword"]

filterByPredicate(["book", "rose", "sword"], ^% in %{00000} OR ^% in %{00001})

The function returns a TEXT LIST with those strings in first argument that also appear in issue Summary or Description.

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 TEXT LIST