From: Thaddeus L Olczyk
Subject: Learning loop.
Date: 
Message-ID: <3c69909d.234743203@nntp.interaccess.com>
Is there somewhere where a person can find a reference to 
the loop macro that convers it inside and out?
Preferably a web site ( so that I can copy it to my internal 
server so I don't have to constantly go digging for it ).

From: Tim Bradshaw
Subject: Re: Learning loop.
Date: 
Message-ID: <ey3bseue0hm.fsf@tfeb.org>
* Thaddeus L Olczyk wrote:
> Is there somewhere where a person can find a reference to 
> the loop macro that convers it inside and out?
> Preferably a web site ( so that I can copy it to my internal 
> server so I don't have to constantly go digging for it ).

The hyperspec is pretty definitive, and is a bunch of web pages.
From: Thomas F. Burdick
Subject: Re: Learning loop.
Date: 
Message-ID: <xcvpu39ud9v.fsf@whirlwind.OCF.Berkeley.EDU>
Tim Bradshaw <···@tfeb.org> writes:

> * Thaddeus L Olczyk wrote:
> > Is there somewhere where a person can find a reference to 
> > the loop macro that convers it inside and out?
> > Preferably a web site ( so that I can copy it to my internal 
> > server so I don't have to constantly go digging for it ).
> 
> The hyperspec is pretty definitive, and is a bunch of web pages.

And it's actually a good way to learn it.  I read some LOOP tutorial
somewhere that got me through for, in, across, collecting, min, max,
and maybe summing and a couple others; then, I just read the spec on
LOOP, which, once you get the basics of LOOP, is an easy, exciting
read.  And I've been fairly loopy ever since ;-)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Thaddeus L Olczyk
Subject: Re: Learning loop.
Date: 
Message-ID: <3c6a2b3a.20704281@nntp.interaccess.com>
On 12 Feb 2002 22:06:04 -0800, ···@whirlwind.OCF.Berkeley.EDU (Thomas
F. Burdick) wrote:

>Tim Bradshaw <···@tfeb.org> writes:
>
>> * Thaddeus L Olczyk wrote:
>> > Is there somewhere where a person can find a reference to 
>> > the loop macro that convers it inside and out?
>> > Preferably a web site ( so that I can copy it to my internal 
>> > server so I don't have to constantly go digging for it ).
>> 
>> The hyperspec is pretty definitive, and is a bunch of web pages.
>
>And it's actually a good way to learn it.  I read some LOOP tutorial
>somewhere that got me through for, in, across, collecting, min, max,
>and maybe summing and a couple others; then, I just read the spec on
>LOOP, which, once you get the basics of LOOP, is an easy, exciting
>read.  And I've been fairly loopy ever since ;-)
Have you read what you wrote:
I learned from a tutorial, then I read CLHS.
So you should read CLHS.
From what you wrote, it sounds more like I should read the tutorial.
PS I find CLHS on the subject very abbreviated. OTOH I've got the
one that came with LispWorks. Maybe I need to find a more upto date
one? Or perhaps a dated one.
From: Tim Bradshaw
Subject: Re: Learning loop.
Date: 
Message-ID: <ey3y9hxd7a5.fsf@tfeb.org>
* Thaddeus L Olczyk wrote:
> Have you read what you wrote:
> I learned from a tutorial, then I read CLHS.
> So you should read CLHS.


*I* think you should learn by playing and by the CLHS, that worked for
me.  Macroexpanding things to see what happens is useful too.

--tim
From: Thomas F. Burdick
Subject: Re: Learning loop.
Date: 
Message-ID: <xcv3d05b192.fsf@conquest.OCF.Berkeley.EDU>
······@interaccess.com (Thaddeus L Olczyk) writes:

> On 12 Feb 2002 22:06:04 -0800, ···@whirlwind.OCF.Berkeley.EDU (Thomas
> F. Burdick) wrote:
> 
> >Tim Bradshaw <···@tfeb.org> writes:
> >
> >> * Thaddeus L Olczyk wrote:
> >> > Is there somewhere where a person can find a reference to 
> >> > the loop macro that convers it inside and out?
> >> > Preferably a web site ( so that I can copy it to my internal 
> >> > server so I don't have to constantly go digging for it ).
> >> 
> >> The hyperspec is pretty definitive, and is a bunch of web pages.
> >
> >And it's actually a good way to learn it.  I read some LOOP tutorial
> >somewhere that got me through for, in, across, collecting, min, max,
> >and maybe summing and a couple others; then, I just read the spec on
> >LOOP, which, once you get the basics of LOOP, is an easy, exciting
> >read.  And I've been fairly loopy ever since ;-)
>
> Have you read what you wrote:
> I learned from a tutorial, then I read CLHS.
> So you should read CLHS.

You somehow got my 57 word statement wrong in your 22 word summary.
That's actually kind of impressive.  I told you how I learned LOOP,
and that's it.  I didn't say what you should do at all, I left that
implied; the implication being (since you seem to have had a hard time
with it the first time) that you should find a simple tutorial that
will get you the basic idea of how LOOP works, then read the spec.  I
mostly learned from the spec.  Of course, I have very good reading
comprehension, so YMMV.

> From what you wrote, it sounds more like I should read the tutorial.
> PS I find CLHS on the subject very abbreviated. OTOH I've got the
> one that came with LispWorks. Maybe I need to find a more upto date
> one? Or perhaps a dated one.

? The content is the same.  Once you get the basic idea of how LOOP
functions, the spec is crystal clear.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Dr. Edmund Weitz
Subject: Re: Learning loop.
Date: 
Message-ID: <m3it91sqav.fsf@bird.agharta.de>
···@whirlwind.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> Tim Bradshaw <···@tfeb.org> writes:
> 
> And it's actually a good way to learn it.  I read some LOOP tutorial
> somewhere that got me through for, in, across, collecting, min, max,
> and maybe summing and a couple others;

Probably this one: <http://www.ai.sri.com/~pkarp/loop.html>.

Edi.

-- 

Dr. Edmund Weitz
Hamburg
Germany

The Common Lisp Cookbook
<http://agharta.de/cookbook/>
From: Thomas F. Burdick
Subject: Re: Learning loop.
Date: 
Message-ID: <xcvzo2d9mny.fsf@conquest.OCF.Berkeley.EDU>
···@agharta.de (Dr. Edmund Weitz) writes:

> ···@whirlwind.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
> 
> > Tim Bradshaw <···@tfeb.org> writes:
> > 
> > And it's actually a good way to learn it.  I read some LOOP tutorial
> > somewhere that got me through for, in, across, collecting, min, max,
> > and maybe summing and a couple others;
> 
> Probably this one: <http://www.ai.sri.com/~pkarp/loop.html>.

It wasn't, although it just as well could have been :)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Erik Winkels
Subject: Re: Learning loop.
Date: 
Message-ID: <87bseuiapb.fsf@xs4all.nl>
······@interaccess.com (Thaddeus L Olczyk) writes:
> Is there somewhere where a person can find a reference to 
> the loop macro that convers it inside and out?
> Preferably a web site ( so that I can copy it to my internal 
> server so I don't have to constantly go digging for it ).

I found section 6.1 "The LOOP Facility" of the HyperSpec quite
helpful.

http://www.xanalys.com/software_tools/reference/HyperSpec/index.html
From: Aleksandr Skobelev
Subject: Re: Learning loop.
Date: 
Message-ID: <64bd4a.kl.ln@hermit.athome>
Have a look at follow links:
    http://www.apl.jhu.edu/~hall/Lisp-Notes/
    http://www.apl.jhu.edu/~hall/Lisp-Notes/Loop-Summary.html

Thaddeus L Olczyk <······@interaccess.com> wrote:
> Is there somewhere where a person can find a reference to 
> the loop macro that convers it inside and out?
> Preferably a web site ( so that I can copy it to my internal 
> server so I don't have to constantly go digging for it ).
> 
From: Jeff Sandys
Subject: Re: Learning loop.
Date: 
Message-ID: <3C6AB90C.ACA43925@juno.com>
Thaddeus L Olczyk wrote:
> 
> Is there somewhere where a person can find a reference to
> the loop macro that convers it inside and out?

I used the book _Common Lisp The Language_ that is available on 
the web at: http://tcw2.ppsw.rug.nl/cltl/clm/node1.html
or: http://www-2.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html

I found it useful to remember that the loop macro uses pairs of 
keywords and values and used colon on the keywords as shown below.

Not everyone agrees with this practice but it helped me quickly 
learn the keywords and recognize when the keywords and values 
were not paired up.  The other benefit is that emacs recognizes 
the keywords and keeps the indentation pretty. 
(cut from emacs):

LISP(5):  (loop
            :for i  :from 1  :to 10
            :collect i  :into num-list
            :count i  :into num-count
            :sum i  :into num-sum
            :finally (return
                       (format nil "Sum of ~s numbers in ~s is ~s"
                               num-count num-list num-sum)))
"Sum of 10 numbers in (1 2 3 4 5 6 7 8 9 10) is 55"
From: Dorai Sitaram
Subject: Re: Learning loop.
Date: 
Message-ID: <a4efec$n0u$1@news.gte.com>
In article <·················@juno.com>, Jeff Sandys  <·······@juno.com> wrote:
>
>I found it useful to remember that the loop macro uses pairs of 
>keywords and values and used colon on the keywords as shown below.
>
>Not everyone agrees with this practice but it helped me quickly 

I remember reading or hearing this disapproval
somewhere too but don't remember the rationale behind
it.  Could someone recount why this colonization tactic
is not approved practice?  

--d



>learn the keywords and recognize when the keywords and values 
>were not paired up.  The other benefit is that emacs recognizes 
>the keywords and keeps the indentation pretty. 
>(cut from emacs):
>
>LISP(5):  (loop
>            :for i  :from 1  :to 10
>            :collect i  :into num-list
>            :count i  :into num-count
>            :sum i  :into num-sum
>            :finally (return
>                       (format nil "Sum of ~s numbers in ~s is ~s"
>                               num-count num-list num-sum)))
From: Tim Moore
Subject: Re: Learning loop.
Date: 
Message-ID: <a4eg0f$852$0@216.39.145.192>
On 13 Feb 2002 19:39:56 GMT, Dorai Sitaram <····@goldshoe.gte.com> wrote:
>In article <·················@juno.com>, Jeff Sandys  <·······@juno.com> wrote:
>>
>>I found it useful to remember that the loop macro uses pairs of 
>>keywords and values and used colon on the keywords as shown below.
>>
>>Not everyone agrees with this practice but it helped me quickly 
>
>I remember reading or hearing this disapproval
>somewhere too but don't remember the rationale behind
>it.  Could someone recount why this colonization tactic
>is not approved practice?  
>
>--d
Because it's butt-ugly.

Tim
From: Kent M Pitman
Subject: Re: Learning loop.
Date: 
Message-ID: <sfwadudcg9b.fsf@shell01.TheWorld.com>
····@goldshoe.gte.com (Dorai Sitaram) writes:

> Jeff Sandys <·······@juno.com> wrote:
>
> >I found it useful to remember that the loop macro uses pairs of 
> >keywords and values and used colon on the keywords as shown below.
> >
> >Not everyone agrees with this practice but it helped me quickly 
> 
> I remember reading or hearing this disapproval somewhere too but
> don't remember the rationale behind it.  Could someone recount why
> this colonization tactic is not approved practice?

Because it looks ugly.

;)
From: Barry Margolin
Subject: Re: Learning loop.
Date: 
Message-ID: <%JAa8.44$Un4.143751@burlma1-snr2>
In article <···············@shell01.TheWorld.com>,
Kent M Pitman  <······@world.std.com> wrote:
>····@goldshoe.gte.com (Dorai Sitaram) writes:
>
>> Jeff Sandys <·······@juno.com> wrote:
>>
>> >I found it useful to remember that the loop macro uses pairs of 
>> >keywords and values and used colon on the keywords as shown below.
>> >
>> >Not everyone agrees with this practice but it helped me quickly 
>> 
>> I remember reading or hearing this disapproval somewhere too but
>> don't remember the rationale behind it.  Could someone recount why
>> this colonization tactic is not approved practice?
>
>Because it looks ugly.

To expand on that, LOOP was designed to look English-like.  Throwing in all
those colons is contrary to this idea.  It no longer looks like English,
and because it doesn't have much in the way of parens it also doesn't look
like Lisp, it's just an ugly mutt of a language.

If you want a Lispy iteration language, use Series.

-- 
Barry Margolin, ······@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Kent M Pitman
Subject: Re: Learning loop.
Date: 
Message-ID: <sfwheolypt1.fsf@shell01.TheWorld.com>
Barry Margolin <······@genuity.net> writes:

> In article <···············@shell01.TheWorld.com>,
> Kent M Pitman  <······@world.std.com> wrote:
> >····@goldshoe.gte.com (Dorai Sitaram) writes:
> >
> >> Jeff Sandys <·······@juno.com> wrote:
> >>
> >> >I found it useful to remember that the loop macro uses pairs of 
> >> >keywords and values and used colon on the keywords as shown below.
> >> >
> >> >Not everyone agrees with this practice but it helped me quickly 
> >> 
> >> I remember reading or hearing this disapproval somewhere too but
> >> don't remember the rationale behind it.  Could someone recount why
> >> this colonization tactic is not approved practice?
> >
> >Because it looks ugly.
> 
> To expand on that, LOOP was designed to look English-like.  Throwing in all
> those colons is contrary to this idea.  It no longer looks like English,
> and because it doesn't have much in the way of parens it also doesn't look
> like Lisp, it's just an ugly mutt of a language.
> 
> If you want a Lispy iteration language, use Series.

I agree with Barry's analysis, but would add further the following:

The aim is not only to look English-like, though it does that too, but
also to offer "infix special operators".  Putting :'s on them looks visually 
to me the same as if you wrote :'s at the start of your special operator 
and/or macro names.

 (:defun f (x)
   (:cond ((zerop x) 1)
          (:t (* x (f (1- x))))))

That's not to say that others don't see it more like keyword-called
functions, which is presumably why they don't mind the colons.  I'm
just trying to explain the alternate view for those who defaultly see
it the other way...
From: Jeff Sandys
Subject: Re: Learning loop.
Date: 
Message-ID: <3C6BFEE0.19932E32@juno.com>
KP|Kent M Pitman wrote:
BM||Barry Margolin <······@genuity.net> writes:
JS||||Jeff Sandys <·······@juno.com> wrote:

JS|||| found it useful to remember that the loop macro uses pairs 
JS|||| of keywords and values and used colon on the keywords.

KP||| Because it looks ugly.

BM|| To expand on that, LOOP was designed to look English-like.  
BM|| Throwing in all those colons is contrary to this idea.  
BM|| It no longer looks like English,

KP| The aim is not only to look English-like, though it does that too, 
KP| but also to offer "infix special operators".  Putting :'s on them 
KP| looks visually to me the same as if you wrote :'s at the start of 
KP| your special operator and/or macro names.

   My question to Kent:
By "infix" you mean that in the expression (loop :for i :from 5 ...)
that the :from has to follow the :for ?

Why do you call them "operators", they do not return a value?

   Comments:
* Yes, it is ugly to those familar to the loop macro.
* Keywords should not look out of place in Lisp.
 * Keywords are part of many functions:
    (remove 3 '(1 2 3 1 3 4 5)  :count 1)
 * We can define our own keywords in our defuns.
* CLTL calls them loop keywords even though CLTL doesn't use the colon.
* It still reads English-like. (the colon is silent :)
 * Thinking that a programming language is English-like is dangerous.
* It is a suggestion for *learning* the loop keywords.
* Advantages:
 * Clarity, keyword value pairs
 * emacs formatting, indents cleanly

My current Lisp programming is with ICAD that extensively 
uses keywords, so I am probably tainted by that experience.

But consider this (bad) lisp dialog in the context 
of teaching and learning the loop macro:

LISP(2): (setq from 1)
1
LISP(3): (setq to 5)
5
LISP(4): (loop for i from from to to 
                                  collect i)
(1 2 3 4 5)
LISP(5): (loop :for i :from from :to to 
               :collect i)
(1 2 3 4 5)


Thanks,
Jeff Sandys
From: Thomas F. Burdick
Subject: Re: Learning loop.
Date: 
Message-ID: <xcvofiral8o.fsf@apocalypse.OCF.Berkeley.EDU>
Jeff Sandys <·······@juno.com> writes:

> KP|Kent M Pitman wrote:
> BM||Barry Margolin <······@genuity.net> writes:
> JS||||Jeff Sandys <·······@juno.com> wrote:
> 
> JS|||| found it useful to remember that the loop macro uses pairs 
> JS|||| of keywords and values and used colon on the keywords.
> 
> KP||| Because it looks ugly.
> 
> BM|| To expand on that, LOOP was designed to look English-like.  
> BM|| Throwing in all those colons is contrary to this idea.  
> BM|| It no longer looks like English,
> 
> KP| The aim is not only to look English-like, though it does that too, 
> KP| but also to offer "infix special operators".  Putting :'s on them 
> KP| looks visually to me the same as if you wrote :'s at the start of 
> KP| your special operator and/or macro names.
> 
>    My question to Kent:
> By "infix" you mean that in the expression (loop :for i :from 5 ...)
> that the :from has to follow the :for ?

I think he means "infix" as in "Pascal-like".  That camp of languages
probably wouldn't call themselves "infix" (because that's hardly their
most interesting characteristic, from their users' point of view), but
from here, that's what they look like.  You could also say
"conventional", but unfortunately, that might imply lots of line-noise
characters.

> Why do you call them "operators", they do not return a value?
> 
>    Comments:
> * Yes, it is ugly to those familar to the loop macro.

It looks ugly without syntax highlighting.  With it, you don't see the
colon, because of the bright color of the "for" in :for

> * Keywords should not look out of place in Lisp.
>  * Keywords are part of many functions:
>     (remove 3 '(1 2 3 1 3 4 5)  :count 1)
>  * We can define our own keywords in our defuns.

But the keywords are only being used as symbols here, not as keywords.
As someone else pointed out:

  (loop :for k
        :being :the
        :hash-keys :of
        my-hash-table :collecting
        (gethash k my-hash-table))

> * CLTL calls them loop keywords even though CLTL doesn't use the colon.

This is an overloading of the term "keyword".

> * It still reads English-like. (the colon is silent :)
>  * Thinking that a programming language is English-like is dangerous.

Thinking that the LOOP language *is* English is dangerous.  Thinking
that it's as english-like as Algol or Pascal, is okay.  Provided the
person thinking this knows Algol or Pascal :)

> * It is a suggestion for *learning* the loop keywords.
> * Advantages:
>  * Clarity, keyword value pairs
>  * emacs formatting, indents cleanly

I used to only code Lisp under X11.  I also used to use keywords as
loop keywords/operators, when I was less comfortable with LOOP.  The
font-locking of it was kind of nice, being more what one would want
for a language of its style.  After a while, I didn't really find much
use for the coloring crutch, and was horrified at how it looked on a
terminal.  So, no more keywords for me :)  The LOOP language is simple
enough that I don't think it really needs coloring.  Unlike, say,
Perl.

> My current Lisp programming is with ICAD that extensively 
> uses keywords, so I am probably tainted by that experience.
> 
> But consider this (bad) lisp dialog in the context 
> of teaching and learning the loop macro:
> 
> LISP(2): (setq from 1)
> 1
> LISP(3): (setq to 5)
> 5
> LISP(4): (loop for i from from to to 
>                                   collect i)
> (1 2 3 4 5)
> LISP(5): (loop :for i :from from :to to 
>                :collect i)
> (1 2 3 4 5)

Huh.  I've never gotten indentation like in (4).

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Dorai Sitaram
Subject: Re: Learning loop.
Date: 
Message-ID: <a4hcj5$p0j$1@news.gte.com>
In article <···············@apocalypse.OCF.Berkeley.EDU>,
Thomas F. Burdick <···@apocalypse.OCF.Berkeley.EDU> wrote:
>Jeff Sandys <·······@juno.com> writes:
>
>> My current Lisp programming is with ICAD that extensively 
>> uses keywords, so I am probably tainted by that experience.
>> 
>> But consider this (bad) lisp dialog in the context 
>> of teaching and learning the loop macro:
>> 
>> LISP(2): (setq from 1)
>> 1
>> LISP(3): (setq to 5)
>> 5
>> LISP(4): (loop for i from from to to 
>>                                   collect i)
>> (1 2 3 4 5)
>> LISP(5): (loop :for i :from from :to to 
>>                :collect i)
>> (1 2 3 4 5)
>
>Huh.  I've never gotten indentation like in (4).

I think Jeff's calling attention to the same identifier
being used to mean different things in the selfsame
expression.  It's confusing to me without a couple of
rescans, but I have a Lisp1 background, so I
doubt it's a universal reaction.  Lisp2+ folks would
probably eat it up and ask for more, "because it's just
like English". 

--d
From: Erik Naggum
Subject: Re: Learning loop.
Date: 
Message-ID: <3222748646015439@naggum.net>
* Jeff Sandys <·······@juno.com>
| JS|||| found it useful to remember that the loop macro uses pairs 
| JS|||| of keywords and values and used colon on the keywords.

  You know, this is not true: "then", "and", and "end" break the keyword
  pair pattern that isn't there.  There are probably more exceptions to
  this non-existing "rule".

  when foo collect x and collect y.

  if foo then if bar then do (mumble) end else do (frotz).

///
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.
From: Lieven Marchand
Subject: Re: Learning loop.
Date: 
Message-ID: <m3d6z9dr3r.fsf@localhost.localdomain>
Jeff Sandys <·······@juno.com> writes:

> I found it useful to remember that the loop macro uses pairs of 
> keywords and values and used colon on the keywords as shown below.

(loop :for key
      :being :each
      :hash-key :of
      <hash-table> :using
      (:hash-value value)
      :collect (list key value))

Maybe I'm doing something wrong here ;-)

-- 
Lieven Marchand <···@wyrd.be>
She says, "Honey, you're a Bastard of great proportion."
He says, "Darling, I plead guilty to that sin."
Cowboy Junkies -- A few simple words
From: Jeff Sandys
Subject: Re: Learning loop.
Date: 
Message-ID: <3C6C3F35.D5666D61@juno.com>
Lieven Marchand wrote:
> Jeff Sandys <·······@juno.com> writes:
> > I found it useful to remember that the loop macro uses pairs of
> > keywords and values and used colon on the keywords as shown below.
> 
> (loop :for key
>       :being :each
>       :hash-key :of
>       <hash-table> :using
>       (:hash-value value)
>       :collect (list key value))
> 
> Maybe I'm doing something wrong here ;-)

I think that the implementation of hash facilities in loop is an 
example of trying to make loop too English-like by adding noise 
words. All eight combinations of each|the, hash-key|hash-keys and 
in|of is valid and do the same thing, where one is needed:
    being each hash-key in       being each hash-key of 
    being the hash-keys in       being the hash-keys of 
    being each hash-keys in      being each hash-keys of 
    being the hash-key in        being the hash-key of 

Also :hash-value|:hash-values creates eight similar combinations.

The words "each" and "the" are just noise words that I think 
should have been left out.  This below is not a legal lisp 
expressions but is easily read and keeps the keyword value pairs:

(loop
  :for key :being hash-key :of <hash-table>
  :using (hash-value value)
  :collect (list key value))

I'm sure if the Lisp standards committee could have found a 
preposition that clearly meant being-the-hash-keys-in they 
would have used it instead.

Finally, my comment is meant for learning the loop facility. 
Most beginners don't start out looping hash tables.  I resisted 
learning loop because it was un-lisp-like, using do instead.  
Once I gronked the keyword value pairs of loop, I understood 
that it was lisp and quickly learned how to use loop.

Loop is a powerful facility that every lisper should learn 
and love to use. (it's St. Valentine's Day today)

Thanks,
Jeff Sandys
From: Barry Margolin
Subject: Re: Learning loop.
Date: 
Message-ID: <B6ab8.28$Se6.59510@burlma1-snr2>
In article <·················@juno.com>, Jeff Sandys  <·······@juno.com> wrote:
>I think that the implementation of hash facilities in loop is an 
>example of trying to make loop too English-like by adding noise 
>words. All eight combinations of each|the, hash-key|hash-keys and 
>in|of is valid and do the same thing, where one is needed:
>    being each hash-key in       being each hash-key of 
>    being the hash-keys in       being the hash-keys of 
>    being each hash-keys in      being each hash-keys of 
>    being the hash-key in        being the hash-key of 

I disagree.  The spirit of this is very similar to that which allows both
COLLECT and COLLECTING:

(loop for x in list
      collecting x)

(loop for x in list
      when (oddp x) collect x)

-- 
Barry Margolin, ······@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Brian P Templeton
Subject: Re: Learning loop.
Date: 
Message-ID: <87heokn819.fsf@tunes.org>
······@interaccess.com (Thaddeus L Olczyk) writes:

> Is there somewhere where a person can find a reference to 
> the loop macro that convers it inside and out?
> Preferably a web site ( so that I can copy it to my internal 
> server so I don't have to constantly go digging for it ).
> 
I often use the cl.el documentation; the cl library contains a
(mostly-complete) LOOP implementation. The docs are in Info format,
which means that I can very easily read them from within Emacs.

(C-h i m cl)

hth,
-- 
BPT <···@tunes.org>	    		/"\ ASCII Ribbon Campaign
backronym for Linux:			\ / No HTML or RTF in mail
	Linux Is Not Unix			 X  No MS-Word in mail
Meme plague ;)   --------->		/ \ Respect Open Standards
From: Thaddeus L Olczyk
Subject: Re: Learning loop.
Date: 
Message-ID: <3c6d35f2.154520734@nntp.interaccess.com>
On Thu, 14 Feb 2002 01:35:30 GMT, Brian P Templeton <···@tunes.org>
wrote:

>······@interaccess.com (Thaddeus L Olczyk) writes:
>
>> Is there somewhere where a person can find a reference to 
>> the loop macro that convers it inside and out?
>> Preferably a web site ( so that I can copy it to my internal 
>> server so I don't have to constantly go digging for it ).
>> 
>I often use the cl.el documentation; the cl library contains a
>(mostly-complete) LOOP implementation. The docs are in Info format,
>which means that I can very easily read them from within Emacs.
>
>(C-h i m cl)
>
>hth,
You're right. Who would have figured it!
From: rydis (Martin Rydstr|m) @CD.Chalmers.SE
Subject: Re: Learning loop.
Date: 
Message-ID: <xf1bseqrps2.fsf@licia.dtek.chalmers.se>
>>>>> "BPT" == Brian P Templeton <···@tunes.org> writes:
BPT> I often use the cl.el documentation; the cl library contains a
BPT> (mostly-complete) LOOP implementation. The docs are in Info format,
BPT> which means that I can very easily read them from within Emacs.

If what you want is Info format CL docs, GCL has one of the drafts for
ANSI CL in Info format. (Or, at least, it used to have.)

TTFN,

'mr

-- 
rydis (Martin Rydstr|m) @CD.Chalmers.SE ; With a spirit soaring ten miles high,
<URL:http://www.cd.chalmers.se/~rydis/> ; I sing loud words that make me cry...
[Emacs] is written in Lisp, which is the only computer language that is
beautiful.  -- Neal Stephenson, _In the Beginning was the Command Line_