time-to-botec/js/node_modules/@stdlib/utils/argument-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

33 lines
610 B
Plaintext

{{alias}}( idx )
Returns a function which always returns a specified argument.
The input argument corresponds to the zero-based index of the argument to
return.
Parameters
----------
idx: integer
Argument index to return (zero-based).
Returns
-------
out: Function
Argument function.
Examples
--------
> var argn = {{alias}}( 1 );
> var v = argn( 3.14, -3.14, 0.0 )
-3.14
> v = argn( -1.0, -0.0, 1.0 )
-0.0
> v = argn( 'beep', 'boop', 'bop' )
'boop'
> v = argn( 'beep' )
undefined
See Also
--------