time-to-botec/js/node_modules/@stdlib/utils/map-function/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

34 lines
674 B
Plaintext

{{alias}}( fcn, n[, thisArg] )
Invokes a function `n` times and returns an array of accumulated function
return values.
The invoked function is provided a single argument: the invocation index
(zero-based).
Parameters
----------
fcn: Function
Function to invoke.
n: integer
Number of times to invoke a function.
thisArg: any (optional)
Function execution context.
Returns
-------
out: Array
Array of accumulated function return values.
Examples
--------
> function fcn( i ) { return i; };
> var arr = {{alias}}( fcn, 5 )
[ 0, 1, 2, 3, 4 ]
See Also
--------