Piers Cawley writes: > All of which means you can wrap it up in a macro and prove Simon's > point about what's syntax and what's CP6AN: > > macro unless_all( Block &test is parsed /<perl.expression>/, > Block &consequence, [EMAIL PROTECTED] ) > { my $guard = Object.new; > for [EMAIL PROTECTED], $guard > -> { when $guard { &consequence() ; last } > when &test { last } } } > > But I've probably got the signature slightly wrong.
I think the only thing that's wrong with your signature is that you said "macro" instead of "sub". Well, and &test has to be finessed into an executable block somehow, but we're not supposed to know how yet. > Higher Order Functions/Methods/Macros are great aren't they? What a modern thinker! Use a *function* to do a common task? *What* are you talking about!? :-) Luke