[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you say "ignore"?
From arpa!ads.com!rshu Tue Dec 12 00:57:00 1989
Received: from Warbucks.AI.SRI.COM by IU.AI.SRI.COM via SMTP with TCP;
Mon, 11 Dec 89 21:49:10-PST
Received: from ads.com by Warbucks.AI.SRI.COM with INTERNET ; Mon,
11 Dec 89 21:47:09 PST
Received: by ads.com (5.59/1.19) id AA24675; Mon,
11 Dec 89 21:47:02 PST
To: slug@Warbucks.AI.SRI.COM
Path: zodiac!rshu
From: rshu@ads.com (Richard Shu)
Newsgroups: mail.info-slug
Subject: Re: How do you say "ignore"?
Message-Id: <10034@zodiac.ADS.COM>
Date: 12 Dec 89 05:47:01 GMT
References: <8912120405.AA01120@diamond.STC.LOCKHEED.COM>
Sender: news@ads.com
Reply-To: rshu@ads.com (Richard Shu)
Organization: Advanced Decision Systems, Mt. View, CA (415) 960-7300
Lines: 28
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.
But
(DEFUN Ignore-Test ()
(LOOP for (x) in '((a b) (c d))
collect x))
will also work.
These opinions are shareware. If you like the product,
please send your $0.02 to
David Loewenstern
{backbone!}att!whutt!davel which is davel@whutt.att.com