"David Formosa (aka ? the Platypus)" <dformosa@[EMAIL PROTECTED]
> writes:
> Likewise perl supports it.
>
> my $fib;
> $fib = sub {
> my $i = shift;
> return 1 if ($i <= 1);
> return $fib->($i-2) + $fib($i-1);
> };
Yes, but that relies on declaring the $fib lexical variable before
assinging the function to it. IIRC the point of the Y-combinator (and
callee) is that you don't have to do that.
Not that there's anything wrong with this approach.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/
| work: http://zeekat.nl/