higher_order_list
The following is a list of functions in the category higher_order_list
Function | Description |
---|---|
all_of | Returns true if all values in a list pass the predicate test. |
all_of_all | Returns true if the result of calling predicate with all of the combination of values from list1 and list2 returns true. |
all_of_any | This function returns true if the result of calling predicate with all of the combination of values from list1 and any of the values of list2 returns true. |
any_of | Returns true if any value in a list pass the predicate test. |
any_of_all | Returns true if the result of calling predicate with all of the combination of values from list2 and any of the values of list1 returns true. |
any_of_any | This function returns true if the result of calling predicate with any of the combination of values from list1 and list2 returns true. |
filter | This produces a list containing only values from another list that pass a predicate test. |
find | The predicate is called for each value in the first list in values until true is returned, then that value is returned. |
map | This function creates a list of the results of calling functor with each value of the first list in values |
reduce | Reduce calls functor for each value in list with two parameters, accumulator and value, and must return a value of any dataType. Parameter accumulator is the reduce() accumulator parameter value on first call and the return value of previous functor() call on subsequent calls. The dataType of the return value should normally be the same as accumulator, but this is not required. |
sort | This produces a list with values sorted based on result of compareFunction. The compareFunction is passed two values from the list and must return an integer less than 0 if the first value is less than the second value, 0 if they are equal, and a integer greater than 0 if the first value is greater than the second value. |