f::const (public, deprecated)

 f::const k

Defined in packages/acs-tcl/tcl/ad-functional-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Returns a unary function that ignores its argument and constantly returns k.

Example

  • map [const 7] [list 1 2 3 4 5] = {7 7 7 7 7}
DEPRECATED: As of tcl8.5, Tcl has native support for 'lambda' provided by means of 'apply' per TIP 194. Tcllib provides a 'lambda' package with procs that make use of it.

Parameters:
k

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
[ show source ]
Show another procedure: