Overview
| Artifact ID: | 31b4988dc6c4ce8ef661aef692335b7f1c6bf8cf |
|---|---|
| Ticket: | 939190ffffffffffffffffffffffffffffffffff
TIP #187:lambda |
| User & Date: | msofer on 2004-04-21 09:52:52 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
The enclosed patch provides an implementation of TIP #187, slightly modified. It creates a new command [lambda], so that % set p [lambda x {string length $x}] ::tcl::lambda::{x {string length $x}} % info proc tcl::lambda::* ::tcl::lambda::Create {::tcl::lambda::{x {string length $x}}} % $p 1 2 wrong # args: should be "::tcl::lambda::{x {string length $x}} x" % $p bgiul 5 % append p " " ::tcl::lambda::{x {string length $x}} % info proc tcl::lambda::* ::tcl::lambda::Create % $p hvjh 4 % info proc tcl::lambda::* ::tcl::lambda::Create {::tcl::lambda::{x {string length $x}} } % info body $p string length $x Note that the lambda expressions auto cleanup on shimmering (when " " was appended), but are otherwise plain procs. The enclosed patch creates the [lambda] as a builtin; it is also possible to only patch tclObj.c and provide the functionality as a C-extension; alternatively, one could also patch only the .c files, and provide the functionality via a pure tcl extension instead of patching init.tcl - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "None"
- title changed to: "TIP #187:lambda"
- type changed to: "Patch"