On Thu, Nov 10, 2005 at 07:23:15AM -0700, Eric wrote: > I'm pretty sure i've heard this discussed but checking S04/Switch > Statments doesn't make any mention of it. If it has been settled > could we get some doc updates?
I looked again more carefully at S04 and saw that Any ~~ Code<$> and Any ~~ Code<> do in fact have definitions in the smartmatch table. Any Code<$> scalar sub truth match if $x($_) Any Code<> simple closure truth* match if $x() (ignoring $_) What is Code<$> and Code<>? Closures accepting a single scalar and no arguments? If so then my and Eric's wishes are answered: when { $_ > 5 } { ... } when { .caloric_value > $doctors_orders } { ... } This isn't implemented in pugs yet, but I guess it can be once this is clarified. -- Gaal Yahas <[EMAIL PROTECTED]> http://gaal.livejournal.com/