From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: loop & finally Date: 14 Sep 2002 21:42:48 +0000 Organization: Naggum Software, Oslo, Norway Lines: 19 Message-ID: <3241028568637781@naggum.no> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1032039768 25060 129.240.64.16 (14 Sep 2002 21:42:48 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 14 Sep 2002 21:42:48 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:40752 * Software Scavenger | On the subject of standard LOOP vs desires, I would like to be able to | concatenate iteration sequences. E.g. (loop as x in '(a b c) then from 1 to | 3 then in '(d e f) collect x) ==> (a b c 1 2 3 d e f). Consider a function `rangeĀ“ (defun range (from to) (loop for i from from to to collect i)) You could use it like this: (loop for x in `(a b c ,@(range 1 3) d e f) ...). -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.