time-to-botec/squiggle/node_modules/@stdlib/utils/constant-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
512 B
Plaintext

{{alias}}( val )
Creates a function which always returns the same value.
Notes:
- When provided an object reference, the returned `function` always returns
the same reference.
Parameters
----------
val: any
Value to always return.
Returns
-------
out: Function
Constant function.
Examples
--------
> var fcn = {{alias}}( 3.14 );
> var v = fcn()
3.14
> v = fcn()
3.14
> v = fcn()
3.14
See Also
--------