"David Formosa (aka ? the Platypus)" <dformosa@[EMAIL PROTECTED]
> writes:
> On Sun, 10 Feb 2008 10:26:42 +0000, Jon Harrop <usenet@[EMAIL PROTECTED]
>
> wrote:
>> Actually, I can't think of any other languages that support recursive
>> anonymous functions anyway: none of Lisp, Scheme, SML, OCaml, F# and
>> Haskell do AFAIK.
>
> You can do anonymous recusion in Lisp and Scheme via letrec. Any
> language where you can implement the Y-combinator you can get
> anonymous recursion.
FTR:
One language I know that directly supports anonymous recursion (without
Y-combinator) is JavaScript:
var fib = function(i) {
if (i == 0 || i == 1) return 1;
return (arguments.callee.call(null,i-1) +
arguments.callee.call(null,i-2));
};
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/
| work: http://zeekat.nl/


|