[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you say "ignore"?
In article <8912120405.AA01120@diamond.STC.LOCKHEED.COM> "RDP%ALAN.LAAC-AI.Dialnet.Symbolics.COM"%ALAN.kahuna.DECNET.LOCKHEED.COM@WARBUCKS.AI.SRI.COM writes:
>
>Does anyone have a standard idiom that they use when ignoring variables
>in a destructuring pattern in LOOP?
>
>For example:
>
>(DEFUN IGNORE-TEST ()
> (LOOP FOR (X IGNORE) IN '((A B) (C D))
> COLLECT X))
>
>The way this is currently written the compiler will complain:
>
>For Function IGNORE-TEST
> While compiling (SETQ IGNORE (CAR #:TEMP)):
> The variable IGNORE is unknown and has been assumed SPECIAL
>
(DEFUN IGNORE-TEST ()
(LOOP FOR (X NIL) IN '((A B) (C D))
COLLECT X))
does the trick.
(responsible-p ADS message)
NIL
(si:halt)
- References:
- How do you say "ignore"?
- From: "RDP%ALAN.LAAC-AI.Dialnet.Symbolics.COM %ALAN.kahuna.DECNET.LOCKHEED.COM"@WARBUCKS.AI.SRI.COM