Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!howland.reston.ans.net!plug.news.pipex.net!pipex!nielsen.co.uk!peer-news.britain.eu.net!newsfeed.ed.ac.uk!edcogsci!jeff
From: jeff@cogsci.ed.ac.uk (Jeff Dalton)
Subject: Re: Loop construct
Message-ID: <DLnFvz.Guo.0.macbeth@cogsci.ed.ac.uk>
Organization: Centre for Cognitive Science, Edinburgh, UK
References: <30FFB947.3B7C@ling.umu.se> <3101A5C3.35B2AFD3@nando.net>
Date: Tue, 23 Jan 1996 19:38:23 GMT
Lines: 33

In article <3101A5C3.35B2AFD3@nando.net> Raymond Toy <rtoy@nando.net> writes:
>Ola Andersson wrote:
>> 
>> Which type of lisp can do this:
>> 
>> (loop for index first (1- (length z-imag)) then (1- index)
>>       when (or (zerop index)
>>                (/= (aref z-imag index) 0.0))
>>         do (return index))
>> 
>> and/or how can I convert it to GNU Common Lisp?
>> It's that "loop for" that gcl doesn't like.
>> 
>
>You can get a copy of the Symbolics loop macro from the
>CMU lisp archives.  It almost works right out of the box.  
>The only change needed is to replace special-operator-p
>with special-form-p (I think).

Add this, after the in-package lines:

#+kcl
(progn
  ;; /\/: Still a little old-fashioned ... [jd 11 Jan 96]
  (defmacro special-operator-p (x) `(special-form-p ,x))
  (deftype real () '(or rational float))
)

Or get:

 http://www.aiai.ed.ac.uk/~jeff/local-ftp/pub/home/jeff/loop.lsp

-- jd
