Adaptive Framework 0.9.0

higher_order_list

The following is a list of functions in the category higher_order_list

FunctionDescription
all_ofReturns true if all values in a list pass the predicate test.
all_of_allReturns true if the result of calling predicate with all of the combination of values from list1 and list2 returns true.
all_of_anyThis 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_ofReturns true if any value in a list pass the predicate test.
any_of_allReturns 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_anyThis function returns true if the result of calling predicate with any of the combination of values from list1 and list2 returns true.
filterThis produces a list containing only values from another list that pass a predicate test.
findThe predicate is called for each value in the first list in values until true is returned, then that value is returned.
mapThis function creates a list of the results of calling functor with each value of the first list in values
reduceReduce 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.
sortThis 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.