Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.lisp
Re: LOOP and "anti-finally"?
William James
2/17/2016 9:39:00 PM
Arthur Lemmens wrote:
> Johan Kullstam wrote:
>
> > I find myself wanting to execute something in a loop *except for* the
> > last iteration. Is there some way to concisely express this?
>
> When you're looping through a list, you can use
>
> (loop for (thing . rest) on list
> when rest
> do (operate-on thing) ; this will not happen for the last thing in list
> ...)
MatzLisp (Ruby):
%w(a b c d).each_cons(2){|x,y| p x}
"a"
"b"
"c"
--
[A]n unholy alliance of leftists, capitalists, and Zionist supremacists has
schemed to promote immigration and miscegenation with the deliberate aim of
breeding us out of existence in our own homelands.... [T]he real aim stays the
same: the biggest genocide in human history.... --- Nick Griffin
(
https://www.youtube.com/watch?v=K...
)
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: LOOP and "anti-finally"?
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