> It strikes me that this is very fragile and limited (unless I
> misunderstand, which is quite possible).
We've thrashed out a much more comprehensive proposal, which I'll
post this morning.
Damian
On Tue, Aug 08, 2000 at 01:27:48PM -0400, Andy Dougherty wrote:
> It strikes me that this is very fragile and limited (unless I
> misunderstand, which is quite possible). For one thing, it appears to
> only be useful if your subroutine uses each argument exactly once. If
> you need to use any of
In RFC 23, Damian Conway <[EMAIL PROTECTED]> proposes a syntax for
"higher-order functions". One example given is related to a proposed
switch statement (RFC 22). A trimmed version is:
> sub beverage {
> switch (shift) {
> case sub{ $_[0] < 10 } { retu
Quoting RFC 23:
> That is, the expression:
>
> $check = __ < 2 + __ * atan($pi/__) or die __;
>
> is equivalent to:
>
> $check = sub (;) {
> $_[0] < 2 + $_[1] * atan($pi/$_[3]) or die $_[4]
> };
It strikes me that this is very fragile and limited (unless