[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loop macro



    Date: Wed, 5 Feb 86 17:46 EST
    From: Soley@MIT-MC.ARPA

	Date: 4 Feb 86 15:50 PST
	From: Gregor.pa@Xerox.COM
	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
	To: BSG@SCRC-STONY-BROOK.ARPA
	cc: Fahlman@C.CS.CMU.EDU, common-lisp@SU-AI.ARPA
	Message-ID: <860204-155111-2418@Xerox>

	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)
	    (collect 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.