[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loop macro
Date: Wed, 5 Feb 86 17:46 EST
Date: 4 Feb 86 15:50 PST
Subject: Re: loop macro
In-reply-to: Bernard S. Greenberg <BSG@SCRC-STONY-BROOK.ARPA>'s message
of Tue, 4 Feb 86 16:38 EST
cc: Fahlman@C.CS.CMU.EDU, common-lisp@SU-AI.ARPA
I think I prefer "lispy" iteration macros. Here is an example of what I
mean by a lispy iteration macro:
;; Return a list of the items in list-of-items
;; which pass the test TEST.
(iterate ((item in list-of-items))
(when (test item)
Parens do not a Lisp code make. This particular example, for instance,
isn't any "lispier" than the equivalent LOOP construction; the
expression "(collect item)" is CERTAINLY not a call to some new function
COLLECT, is it?
Don't laugh, Richard. Suppose ITERATE fletted the name COLLECT.....
That could be a very reasonable implementation.