First page Back Continue Last page Overview Image
8.5 Control Structures – Lambdas
set plus {{a b} { expr { $a + $b }}}
set z [apply $plus 2 3]
→ 5
Can be namespaced:
set plus {{b} { variable a ; expr { $a + $b } ::foo}
This looks in namespace foo for variable a.
Something like apply $plus
is a viable command prefix for callbacks.