Damian Conway writes: > $add = ^a + ^b; > # a thousand lines later... > $incr = $add->(1); > # a thousand lines later... > $x = $incr->($x); I picture $add->(1) cloning add's optree, filling in the 1 where appropriate, then returning a reference to the new (cloned) optree. What to do with private variables (and the possible stack of private variable bindings that goes with recursion) is something I can't see my way through. When there are no more language objections to this, I say we throw it over to the -internals group to pick at. It is quite a meaty bone. Nat (thinking in perl5 internals terms. bad me.)
- RFC 23 (v3) Higher order functions Perl6 RFC Librarian
- Re: RFC 23 (v3) Higher order functions Nathan Torkington
- Re: RFC 23 (v3) Higher order functions Glenn Linderman
- Re: RFC 23 (v3) Higher order functions Peter Buckingham
- Re: RFC 23 (v3) Higher order functions Damian Conway
- Re: RFC 23 (v3) Higher order function... Nathan Torkington
- Re: RFC 23 (v3) Higher order functions Damian Conway
- Re: RFC 23 (v3) Higher order functions Nathan Wiger
- Re: RFC 23 (v3) Higher order functions Jeremy Howard
- Re: RFC 23 (v3) Higher order functions Damian Conway
- Re: RFC 23 (v3) Higher order functions Jonathan Scott Duff
- Re: RFC 23 (v3) Higher order functions Damian Conway
- Re: RFC 23 (v3) Higher order functions Steve Fink
- Re: RFC 23 (v3) Higher order functions Nathan Torkington
- Re: RFC 23 (v3) Higher order functions Larry Wall
- Re: RFC 23 (v3) Higher order functions Damian Conway