Subject: Re: the loop keyword IT
From: (Rob Warnock)
Date: Fri, 10 Mar 2006 21:21:56 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Ken Tilton  <> wrote:
| Kalle Olavi Niemitalo wrote:
| > Ken Tilton <> writes:
| >>   when (getf ....)
| >>   collect (cons (first slot-def) it) ;; "it" = obscure loop trick
| > 
| > IT works only immediately after another loop keyword; not when
| > shielded from sight by parentheses.
| Worked for me, but what you say makes sense. Might be an implementation 
| thing. Thx.

Maybe another one of those CLtL2 thingies...? The CLHS is
pretty explicit about IT being usable in only two places:

    6.1.6 Conditional Execution Clauses
    The loop keyword IT can be used to refer to the result of the
    test expression in a clause. Use the loop keyword IT in place
    of the form in a RETURN clause or an accumulation clause that
    is inside a conditional execution clause.

An even further restriction:

    If multiple clauses are connected with AND, the IT construct
    must be in the first clause in the block.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607