Short for the K combinator, together with [S] the fundamental functional operators from which all function composition can be done. It is extremely simple: proc K {x y} {set x} It just returns its first argument (and discards the second). The advantage is that in this way you can hold an intermediate result which you finally want to return, after doing more processing (which ends up in y) where only the side effects matter. Consider popping a global stack (top at end): proc pop1 {} { set top [lindex $::Stack end] set ::Stack [lrange $::Stack 0 end-1] return $top } or, implemented with K: proc pop2 {} {K [lindex $::Stack end] [set ::Stack [lrange $::Stack 0 end-1]]} One command less, one variable less, a slick one-liner (from: [A different FORTH]). See [Hot curry] and [Combinator engine] for more details than you'd expect ;-) ---- Another use of K is for making a ''get-and-unset'' command, which can be rather useful for efficient handling of [Tcl_Obj]s. Note that this is ''not'' done as a procedure ([AJD] but surely [K] is a procedure?); that adds quite a bit of execution overhead. Replace ''$someVar'' with:c [K $someVar [unset someVar]] [AJD] Note, that if someVar is going to be reused, then it is more efficient to: set someVar [someFunc [K $someVar [set someVar ""]]] ---- K provides profound [performance] advantages that are not immediately apparent, changing common operations from quadratic in data length to constant scale. [Helmut Giese] writes about this in [http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=left&th=e10961de4c1fa2db] and [http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=left&th=3bee8eec0c1c337b&th=3bee8eec0c1c337b]. ---- [Category Concept] | [Arts and crafts of Tcl-Tk programming]