Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!mit-eddie!husc6!cmcl2!nrl-cmf!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!dcl-cs!simon From: simon@dcl-cs.UUCP Newsgroups: comp.lang.lisp Subject: Re: A CL iteration macro, "while". Summary: That's nice, but how about this? Keywords: LOOP WHILE UNTIL ITERATION MACROS Message-ID: <464@dcl-csvax.comp.lancs.ac.uk> Date: 15 Jan 88 16:31:51 GMT References: <13639@beta.UUCP> <3503@whuts.UUCP> Reply-To: simon@comp.lancs.ac.uk (Simon Brooke) Organization: Department of Computing at Lancaster University, UK. Lines: 27 Posted: Fri Jan 15 11:31:51 1988 In article <3503@whuts.UUCP> davel@whuts.UUCP (David Loewenstern) writes: >In article <13639@beta.UUCP>, dzzr@beta.UUCP (Douglas J Roberts) writes: >> >> I was poking around in the source for Stallman's Gnu Emacs the other day >> and stumbled across a "while" function that I kind of liked. Yes, that's nice; but there's a nicer. How about this, which is Arthur Norman's loop macro: (loop (until ) (while ) ) The 'while' and 'until' conditions can appear any number of times, (including zero) anywhere in the body of the loop. The flexibility of this is wonderful - and I'd love to see the source code for it! It appears in Acornsoft's lisp for the BBC Micro and their more recent lisp for the new acorn risc machine (Archimedes); so you lot west of the water may not have seen it. But it's a lovely construct! [Obviously, it returns the value of the last of the after-exit statements of the until- or while- statement which allowed exit] Simon Brooke simon@uk.ac.lancs.comp