Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "B. Pym" Newsgroups: comp.lang.lisp Subject: Re: CL: Processing more than one element of a sequence at a time? Date: Mon, 19 Aug 2024 01:50:18 -0000 (UTC) Organization: A noiseless patient Spider Lines: 26 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Injection-Date: Mon, 19 Aug 2024 03:50:18 +0200 (CEST) Injection-Info: dont-email.me; posting-host="73cb5f305d7564436335108f5e5d2005"; logging-data="2856827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zI3KOiEnnDuQp9ZIVbV+R" User-Agent: XanaNews/1.18.1.6 Cancel-Lock: sha1:5MXX0oW/3kA+mCiEUPgdHsLMTkY= Bytes: 1502 Frode V. Fjeld wrote: > Raffaele Ricciardi writes: > > > in CL, is there an idiomatic way to process more than one element of a > > sequence at a time? > > Yes: (loop for (a b) on list by #'cddr collect (cons a b)) > > Or without LOOP, I'd do: > > (do ((a (pop list) (pop list)) > (b (pop list) (pop list)) > (result nil)) > ((null list) (reverse result)) > (push (cons a b) result)) newLISP (apply (fn (result a b) (push (cons a b) result -1)) (cons '() '(f 3 g 4 h 5)) 3 ;; How many items to process at a time. ) ((f 3) (g 4) (h 5))