See the dojox/lang/functional/array reference documentation for more information.
builds a function from a snippet, returns a string, which represents the function.
This method returns a textual representation of a function built from the snippet. It is meant to be evaled in the proper context, so local variables can be pulled from the environment.
Parameter | Type | Description |
---|---|---|
s | String |
tests whether all elements in the array pass the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
tests whether all elements in the array pass the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
creates a new array with all elements that pass the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
creates new object with all attributes that pass the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
obj | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
creates a new array with all elements that pass the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from left to right using a seed value as a starting point; returns the final value.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | |
z | Object | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from left to right; returns the final value.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from right to left using a seed value as a starting point; returns the final value.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
z | Object | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from right to left; returns the final value.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
executes a provided function once per array element.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
executes a provided function once per array element.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
iterates over all object attributes.
Parameter | Type | Description |
---|---|---|
obj | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
returns an array of all keys in the object
Parameter | Type | Description |
---|---|---|
obj | Object |
builds a function from a snippet, or array (composing), returns a function object; functions are passed through unmodified.
This method is used to normalize a functional representation (a text snippet, an array, or a function) to a function object.
Parameter | Type | Description |
---|---|---|
s | Function | String | Array |
creates a new array with the results of calling a provided function on every element in this array.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
creates new object with the results of calling a provided function on every attribute in this object.
Parameter | Type | Description |
---|---|---|
obj | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
creates a new array with the results of calling a provided function on every element in this array.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
builds a function from a snippet, or array (composing), returns an object describing the function; functions are passed through unmodified.
This method is to normalize a functional representation (a text snippet) to an object that contains an array of arguments, and a body , which is used to calculate the returning value.
Parameter | Type | Description |
---|---|---|
s | String |
apply a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
z | Object |
Optional
|
apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
z | Object |
Optional
|
builds an array by repeatedly applying a unary function N times with a seed value Z. N should be greater than 0.
Parameter | Type | Description |
---|---|---|
n | Number | |
f | Function | String | Array | |
z | Object | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from left to right using a seed value as a starting point; returns an array of values produced by foldl() at that point.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
z | Object | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from left to right; returns an array of values produced by foldl1() at that point.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from right to left using a seed value as a starting point; returns an array of values produced by foldr() at that point.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
z | Object | |
o | Object |
Optional
|
repeatedly applies a binary function to an array from right to left; returns an array of values produced by foldr1() at that point.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
tests whether some element in the array passes the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
a | Array | String | Object | |
f | Function | String | Array | |
o | Object |
Optional
|
tests whether some element in the array passes the test implemented by the provided function.
Parameter | Type | Description |
---|---|---|
a | Array | String | |
f | Function | String | Array | |
o | Object |
Optional
|
builds an array by unfolding a value
Parameter | Type | Description |
---|---|---|
pr | Function | String | Array | |
f | Function | String | Array | |
g | Function | String | Array | |
z | Object | |
o | Object |
Optional
|
builds an array by repeatedly applying a unary function with a seed value Z until the predicate is satisfied.
Parameter | Type | Description |
---|---|---|
pr | Function | String | Array | |
f | Function | String | Array | |
z | Object | |
o | Object |
Optional
|
returns an array of all values in the object
Parameter | Type | Description |
---|---|---|
obj | Object |