Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.lisp
Re: Learning Lisp in Linux?
William James
12/30/2015 7:52:00 AM
Nicolas Neuss wrote:
> > does this look like assembly?
> >
> > (define (! n)
> > (let loop ((x n) (r 1))
> > (if (zero? x) r
> > (loop (- x 1) (* x r)))))
>
> Yes, it does compared with
>
> (defun factorial (n)
> (loop for n from 1 upto n
> and f = 1 then (* f n)
> finally (return f)))
MatzLisp (Ruby):
def fact n
(1..n).reduce{|f,i| f*i}
end
--
Amazon bans book. After nearly a month on the site, all traces of the book and
its 80 reviews have been removed.
http://jamesfetzer.blogspot.com/2015/11/debunking-sandy-hook-debunk...
https://www.youtube.com/watch?v=E...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Learning Lisp in Linux?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password