FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |
Action summary | |
---|---|
boolean | static _all(any seq)
Logical 'AND' over a sequence of booleans |
boolean | static _any(any seq)
Logical 'OR' over a sequence of booleans |
action<any> returns boolean | static _not(any pred)
A predicate which inverts the value of another predicate. |
com.apamax.functional.Generator | static accumulate(any container, any func)
Returns a generator which accumulates over the underlying container, returning the result after accumulating each item. Similar to reduce, but returns a generator for each item in turn, rather than just the final total. The initial value of the accumulator is the default value of func's return type (TYPEB). |
com.apamax.functional.Generator | static accumulateFrom(any start, any container, any func)
Returns a generator which accumulates over the underlying container, returning the result after accumulating each item. Similar to reduce, but returns a generator for each item in turn, rather than just the final total. |
any | static argmap(any container, any func)
Iterates through a sequence, or a generator and uses the result as a list of arguments with which to invoke a function. These inner sequences will be treated as a list of arguments to the given function, or a single argument to that function. Each generated item will be the result of calling func with the next set of arguments. |
any | static callAction(string actionName, sequence<any> args, any value)
Functor to call the named action on the value. |
string | static concat(string acc, string i)
Action which concatenates strings using accumulate or reduce. |
any | static consume(any generator, integer n)
Consume a given number of items from a generator and discard them. |
com.apamax.functional.Generator | static count()
Returns a generator producing sequential integers with the first one being 0. |
com.apamax.functional.Generator | static cycle(any seq)
Iterates through a sequence of items and continues looping forever. |
boolean | static even(integer i)
A predicate which returns true if the argument is even. |
integer | static filter(any container, any func)
Takes either a sequence, a dictionary or a generator and filters the contents using a boolean predicate func. |
com.apamax.functional.Generator | static generator(any func)
Create a generator from a function, which is passed the previous value and should return the next value. The initial value will be a default-initialized TYPE and the result of first generation will be the result of invoking func on that default-initialized value. To specify the initial value, use generateFrom. |
com.apamax.functional.Generator | static generatorFrom(any start, any func)
Create a generator from a function, which is passed the previous value and should return the next value. |
any | static getAllEvents(string valueEventName, dictionary<string, any> valueEventFields, string endEventName, dictionary<string, any> endEventFields, float timeout, any onComplete, any onTimeout)
Listens for all of the given events and then calls the given function once a second event arrives. |
integer | static increment(integer i)
Increments the given integer |
boolean | static istrue(boolean b)
A predicate which returns true if the argument is true. |
sequence<listener> | static listenForAnyOf(any seq, string typeName, string fieldName, dictionary<string, any> otherFields, any arrivedAction)
Takes a sequence of values and starts a listener one for each of them, with an action to call if any of those events arrive. |
integer | static map(any container, any func)
Takes either a sequence, a dictionary or a generator and maps the contents using a function. |
any | static mul(any acc, any i)
Action for multiplying together the values in a sequence or generator of integer, float or decimal using accumulate or reduce. |
boolean | static negative(any i)
A predicate which returns true if the argument is negative. |
boolean | static odd(integer i)
A predicate which returns true if the argument is odd. |
com.apamax.functional.Partial | static partial(any func, any args)
Partially execute a function, providing some arguments, to be later executed with the remaining arguments. Arguments must be provided left-to-right for the function call to be invoked. eg: Partial p := Fn.partial(concatFn, "Hello"); <string>p.exec(" world"); Partial objects can be passed to any of the other actions on Fn where an action would be expected. |
boolean | static positive(any i)
A predicate which returns true if the argument is positive (not including 0). |
integer | static quantify(any container, any pred)
Counts how many times a predicate is true for the values of a sequence or dictionary. |
sequence<integer> | static range(integer start, integer end, integer stride)
Returns a range of integers from start (inclusive) to end (exclusive), incrementing stride each time. |
any | static reduce(any container, any func)
Takes either a sequence or a dictionary and accumulates all of the values using an accumulator function, returning the final result. |
any | static reduceFrom(any accumulator, any container, any func)
Takes either a sequence or a dictionary and accumulates all of the values using an accumulator function, returning the final result. |
com.apamax.functional.Generator | static repeat(any item)
Repeats the given element forever. |
any | static sequenceOf(any item, integer n)
Returns a sequence containing the given item the given number of times. |
any | static slice(any container, integer start, integer end, integer stride)
Takes either a sequence or a generator and returns a given sub-range as a finite sequence. If it is passed a generator, it will invoke the generator sufficient times immediately to satisfy the slice. |
any | static sum(any acc, any i)
Action for adding up a sequence or generator of integer, float or decimal using accumulate or reduce. |
any | static waitForAllCompleted(any seq, string typeName, string fieldName, float timeout, any onCompleted, any onTimeout)
Wait for completion of several asynchronous tasks. |
boolean | static whole(any i)
A predicate which returns true if the argument is a whole number. |
Action detail |
---|
boolean static _all(any seq)Logical 'AND' over a sequence of booleans
boolean static _any(any seq)Logical 'OR' over a sequence of booleans
action<any> returns boolean static _not(any pred)A predicate which inverts the value of another predicate.
com.apamax.functional.Generator static accumulate(any container, any func)Returns a generator which accumulates over the underlying container, returning the result after accumulating each item. Similar to reduce, but returns a generator for each item in turn, rather than just the final total. The initial value of the accumulator is the default value of func's return type (TYPEB).
com.apamax.functional.Generator static accumulateFrom(any start, any container, any func)Returns a generator which accumulates over the underlying container, returning the result after accumulating each item. Similar to reduce, but returns a generator for each item in turn, rather than just the final total.
any static argmap(any container, any func)Iterates through a sequence, or a generator and uses the result as a list of arguments with which to invoke a function. These inner sequences will be treated as a list of arguments to the given function, or a single argument to that function. Each generated item will be the result of calling func with the next set of arguments.
any static callAction(string actionName, sequence<any> args, any value)Functor to call the named action on the value.
string static concat(string acc, string i)Action which concatenates strings using accumulate or reduce.
any static consume(any generator, integer n)Consume a given number of items from a generator and discard them.
com.apamax.functional.Generator static count()Returns a generator producing sequential integers with the first one being 0.
com.apamax.functional.Generator static cycle(any seq)Iterates through a sequence of items and continues looping forever.
boolean static even(integer i)A predicate which returns true if the argument is even.
integer static filter(any container, any func)Takes either a sequence, a dictionary or a generator and filters the contents using a boolean predicate func.
com.apamax.functional.Generator static generator(any func)Create a generator from a function, which is passed the previous value and should return the next value. The initial value will be a default-initialized TYPE and the result of first generation will be the result of invoking func on that default-initialized value. To specify the initial value, use generateFrom.
com.apamax.functional.Generator static generatorFrom(any start, any func)Create a generator from a function, which is passed the previous value and should return the next value.
any static getAllEvents(string valueEventName, dictionary<string, any> valueEventFields, string endEventName, dictionary<string, any> endEventFields, float timeout, any onComplete, any onTimeout)Listens for all of the given events and then calls the given function once a second event arrives.
integer static increment(integer i)Increments the given integer
boolean static istrue(boolean b)A predicate which returns true if the argument is true.
sequence<listener> static listenForAnyOf(any seq, string typeName, string fieldName, dictionary<string, any> otherFields, any arrivedAction)Takes a sequence of values and starts a listener one for each of them, with an action to call if any of those events arrive.
integer static map(any container, any func)Takes either a sequence, a dictionary or a generator and maps the contents using a function.
any static mul(any acc, any i)Action for multiplying together the values in a sequence or generator of integer, float or decimal using accumulate or reduce.
boolean static negative(any i)A predicate which returns true if the argument is negative.
boolean static odd(integer i)A predicate which returns true if the argument is odd.
com.apamax.functional.Partial static partial(any func, any args)Partially execute a function, providing some arguments, to be later executed with the remaining arguments. Arguments must be provided left-to-right for the function call to be invoked. eg: Partial p := Fn.partial(concatFn, "Hello"); <string>p.exec(" world"); Partial objects can be passed to any of the other actions on Fn where an action would be expected.
boolean static positive(any i)A predicate which returns true if the argument is positive (not including 0).
integer static quantify(any container, any pred)Counts how many times a predicate is true for the values of a sequence or dictionary.
sequence<integer> static range(integer start, integer end, integer stride)Returns a range of integers from start (inclusive) to end (exclusive), incrementing stride each time.
any static reduce(any container, any func)Takes either a sequence or a dictionary and accumulates all of the values using an accumulator function, returning the final result.
any static reduceFrom(any accumulator, any container, any func)Takes either a sequence or a dictionary and accumulates all of the values using an accumulator function, returning the final result.
com.apamax.functional.Generator static repeat(any item)Repeats the given element forever.
any static sequenceOf(any item, integer n)Returns a sequence containing the given item the given number of times.
any static slice(any container, integer start, integer end, integer stride)Takes either a sequence or a generator and returns a given sub-range as a finite sequence. If it is passed a generator, it will invoke the generator sufficient times immediately to satisfy the slice.
any static sum(any acc, any i)Action for adding up a sequence or generator of integer, float or decimal using accumulate or reduce.
any static waitForAllCompleted(any seq, string typeName, string fieldName, float timeout, any onCompleted, any onTimeout)Wait for completion of several asynchronous tasks.
boolean static whole(any i)A predicate which returns true if the argument is a whole number.
FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |