Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Factorial in LISP

Name: Anonymous 2011-02-05 13:59


factorial 1->1; n->n*(factorial n-1)


compare to Haskell

factorial::Integer->Integer
factorial 0=1
factorial n=n*factorial(n-1)

Name: Anonymous 2011-02-05 20:41

0]=> telnet common-lisp.net 80
Trying 208.72.159.207...
Connected to common-lisp.net.
Escape character is '^]'.
GET / HTTP/1.1
Host: common-lisp.net

HTTP/1.1 200 OK
Date: Sun, 06 Feb 2011 01:52:06 GMT
Server: Apache/1.3.34 (Debian)
PHP/4.4.4-8+etch6 mod_fastcgi/2.4.2 mod_perl/1.29
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List