Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.lisp
Re: shootout: implementing an interpreter
William James
12/27/2015 5:18:00 PM
> So the product of the sums of the elements of two lists could be
> written using iterate as:
>
> (iter (x in xs)
> (y in ys)
> (if (= (+ x y) 0) (leave 0))
> (multiply (+ x y) into z)
> (finally z))
MatzLisp (Ruby):
xs = [0,1,2]
ys = [4,5,6]
xs.zip(ys).reduce(1){|z,(x,y)| t=x+y; break 0 if t.zero?; z*t}
===>
192
--
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: shootout: implementing an interpreter
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