Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 31b4988dc6c4ce8ef661aef692335b7f1c6bf8cf
Ticket: 939190ffffffffffffffffffffffffffffffffff
TIP #187:lambda
User & Date: msofer on 2004-04-21 09:52:52
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. 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
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "None"
  10. title changed to: "TIP #187:lambda"
  11. type changed to: "Patch"