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
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.
map [const 7] [list 1 2 3 4 5] = {7 7 7 7 7}
- Parameters:
- k
See Also:- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ns_log Notice "Deprecated proc f::const used:\n[ad_get_tcl_call_stack]" lambda {x} [list return $k]XQL Not present: Generic, PostgreSQL, Oracle