Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: the necessi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 2763 of 2841
Post > Topic >>

Re: the necessity of Lisp's Objects?

by Joost Diepenmaat <joost@[EMAIL PROTECTED] > Feb 10, 2008 at 02:36 PM

"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/




 3 Posts in Topic:
Re: the necessity of Lisp's Objects?
Joost Diepenmaat <joos  2008-02-10 14:36:37 
Re: the necessity of Lisp's Objects?
"David Formosa (aka   2008-02-10 20:08:45 
Re: the necessity of Lisp's Objects?
Ken Tilton <kennytilto  2008-02-10 16:18:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:51:51 CDT 2008.