time-to-botec/js/node_modules/@stdlib/utils/argument-function/docs/repl.txt

33 lines
610 B
Plaintext
Raw Normal View History

{{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
--------