From: smartnose
Subject: Type checking problem
Date: 
Message-ID: <febfad02-b5cd-4933-a2e2-fdd0d5bb6cfc@f63g2000hsf.googlegroups.com>
I want to check whether a list contains any nonnumericals.  If I scan
the list one by one and use TYPE-OF, then I have to test if an item is
any kind of number, e.g. a INTEGER, BIT, SINGLE-FLOAT, BIGNUM etc.
etc.

The code would be long and tedious. Is there any shortcut function
like IsNumeric in Java?

Thanks.

W.

From: Frank Buss
Subject: Re: Type checking problem
Date: 
Message-ID: <1fifuykkqo9cq.18p2z7szivdhi$.dlg@40tude.net>
smartnose wrote:

> I want to check whether a list contains any nonnumericals.  If I scan
> the list one by one and use TYPE-OF, then I have to test if an item is
> any kind of number, e.g. a INTEGER, BIT, SINGLE-FLOAT, BIGNUM etc.
> etc.

(not (every #'numberp '(1 2 3)))

> The code would be long and tedious. Is there any shortcut function
> like IsNumeric in Java?

In which standard Java class is this method defined?

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: smartnose
Subject: Re: Type checking problem
Date: 
Message-ID: <57c6ac01-deae-4deb-9cdc-10b41203135b@c65g2000hsa.googlegroups.com>
Thanks. Frank and Pascal.

I found that IsNumeric is actually a VB function.

My memory is getting messy but I have to learn yet another language...

On Sep 7, 10:11 am, Frank Buss <····@frank-buss.de> wrote:
> smartnose wrote:
> > I want to check whether a list contains any nonnumericals.  If I scan
> > the list one by one and use TYPE-OF, then I have to test if an item is
> > any kind of number, e.g. a INTEGER, BIT, SINGLE-FLOAT, BIGNUM etc.
> > etc.
>
> (not (every #'numberp '(1 2 3)))
>
> > The code would be long and tedious. Is there any shortcut function
> > like IsNumeric in Java?
>
> In which standard Java class is this method defined?
>
> --
> Frank Buss, ····@frank-buss.dehttp://www.frank-buss.de,http://www.it4-systems.de
From: stassats
Subject: Re: Type checking problem
Date: 
Message-ID: <2b0396f6-12fe-49ee-9206-ce52d7257f62@x35g2000hsb.googlegroups.com>
On Sep 7, 6:11 pm, Frank Buss <····@frank-buss.de> wrote:
> smartnose wrote:
> > I want to check whether a list contains any nonnumericals.  If I scan
> > the list one by one and use TYPE-OF, then I have to test if an item is
> > any kind of number, e.g. a INTEGER, BIT, SINGLE-FLOAT, BIGNUM etc.
> > etc.
>
> (not (every #'numberp '(1 2 3)))
>

(notevery #'numberp '(1 2 3))
From: Pascal J. Bourguignon
Subject: Re: Type checking problem
Date: 
Message-ID: <874p4skpew.fsf@hubble.informatimago.com>
Frank Buss <··@frank-buss.de> writes:

> smartnose wrote:
>
>> I want to check whether a list contains any nonnumericals.  If I scan
>> the list one by one and use TYPE-OF, then I have to test if an item is
>> any kind of number, e.g. a INTEGER, BIT, SINGLE-FLOAT, BIGNUM etc.
>> etc.
>
> (not (every #'numberp '(1 2 3)))

(position-if-not (function numberp) '(1 2 nil 3))  -> true
(position-if-not (function numberp) '(1 2 3))      -> NIL

No need for NOT ;-)

>> The code would be long and tedious. Is there any shortcut function
>> like IsNumeric in Java?

NUMBERP is IsNumeric.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

CAUTION: The mass of this product contains the energy equivalent of
85 million tons of TNT per net ounce of weight.
From: Frank Buss
Subject: Re: Type checking problem
Date: 
Message-ID: <1xnlxkmeu8061.9oajijfaax11$.dlg@40tude.net>
Pascal J. Bourguignon wrote:

> Frank Buss <··@frank-buss.de> writes:
>>
>> (not (every #'numberp '(1 2 3)))
> 
> (position-if-not (function numberp) '(1 2 nil 3))  -> true
> (position-if-not (function numberp) '(1 2 3))      -> NIL
> 
> No need for NOT ;-)

Yes, but my solution looks nearly as native English and is shorter :-)

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Kenny
Subject: Re: Type checking problem
Date: 
Message-ID: <48c3eaa0$0$7315$607ed4bc@cv.net>
Frank Buss wrote:
> Pascal J. Bourguignon wrote:
> 
> 
>>Frank Buss <··@frank-buss.de> writes:
>>
>>>(not (every #'numberp '(1 2 3)))
>>
>>(position-if-not (function numberp) '(1 2 nil 3))  -> true
>>(position-if-not (function numberp) '(1 2 3))      -> NIL
>>
>>No need for NOT ;-)
> 
> 
> Yes, but my solution looks nearly as native English and is shorter :-)
> 


Come on, you two:

> 17.3.15 position, position-if, position-if-not
...
> Notes:
> The :test-not argument is deprecated.
> The function position-if-not is deprecated.

After we revise the standard (I understand Ron, Xah, Gavino, Jon, and 
Ilias have formed a committee) and all the implementors take those out, 
where will that leave the poor noob??????????????

kenny
From: Joshua Taylor
Subject: Re: Type checking problem
Date: 
Message-ID: <f0b0baec-88d1-49db-b0b9-4bc25d8ee8a7@m36g2000hse.googlegroups.com>
On Sep 7, 10:50 am, Kenny <·········@gmail.com> wrote:
> Frank Buss wrote:
> > Pascal J. Bourguignon wrote:
>
> >>Frank Buss <····@frank-buss.de> writes:
>
> >>>(not (every #'numberp '(1 2 3)))
>
> >>(position-if-not (function numberp) '(1 2 nil 3))  -> true
> >>(position-if-not (function numberp) '(1 2 3))      -> NIL
>
> >>No need for NOT ;-)
>
> > Yes, but my solution looks nearly as native English and is shorter :-)
>
> Come on, you two:
>
> > 17.3.15 position, position-if, position-if-not
> ...
> > Notes:
> > The :test-not argument is deprecated.
> > The function position-if-not is deprecated.
>  ...
> kenny

And the page on COMPLEMENT mentions this too:

] Note that since the ``xxx-if-not'' functions and the :test-not
] arguments have been deprecated, uses of ``xxx-if'' functions
] or :test arguments with complement are preferred.

So in addition to the aforementioned

  (not (every #'numberp '(1 2 3))) => NIL
  (not (every #'numberp '(1 X 3))) => X

you can also have

  (some (complement #'numberp) '(1 2 3)) => NIL
  (some (complement #'numberp) '(1 X 3)) => T

and of course, with find and position

  (find-if (complement #'numberp) '(1 2 3)) => NIL
  (find-if (complement #'numberp) '(1 X 3)) => X

  (position-if (complement #'numberp) '(1 2 3)) => NIL
  (position-if (complement #'numberp) '(1 X 3)) => 1

COMPLEMENT and CONSTANTLY are very useful functions. (And can reveal
some interesting implementation details. E.g., under LispWorks,
(constantly NIL) returns #<Function FALSE>. That's how I discovered
LispWorks functions, FALSE, TRUE, and DO-NOTHING.)
From: Joost Kremers
Subject: Re: Type checking problem
Date: 
Message-ID: <slrngc8cdd.30r.joostkremers@j.kremers4.news.arnhem.chello.nl>
Kenny wrote:
>> 17.3.15 position, position-if, position-if-not
> ...
>> Notes:
>> The :test-not argument is deprecated.
>> The function position-if-not is deprecated.
> 
> After we revise the standard (I understand Ron, Xah, Gavino, Jon, and 
> Ilias have formed a committee) and all the implementors take those out, 
> where will that leave the poor noob??????????????

maybe it's not so bad. after all, peter seibel writes:

"According to the language standard, the -IF-NOT variants are deprecated.
However, that deprecation is generally considered to have itself been
ill-advised. If the standard is ever revised, it's more likely the
deprecation will be removed than the -IF-NOT functions." (PCL, p. 133)

i'm (very) far from qualified to have an opinion on the matter, but i don't
see why the -IF-NOTs would have to go...


-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: George Neuner
Subject: Re: Type checking problem
Date: 
Message-ID: <2ie8c4lrqk9jllnb9n1e2140t63rt680u4@4ax.com>
On 7 Sep 2008 19:56:58 GMT, Joost Kremers <············@yahoo.com>
wrote:

>Kenny wrote:
>>> 17.3.15 position, position-if, position-if-not
>> ...
>>> Notes:
>>> The :test-not argument is deprecated.
>>> The function position-if-not is deprecated.
>> 
>> After we revise the standard (I understand Ron, Xah, Gavino, Jon, and 
>> Ilias have formed a committee) and all the implementors take those out, 
>> where will that leave the poor noob??????????????
>
>maybe it's not so bad. after all, peter seibel writes:
>
>"According to the language standard, the -IF-NOT variants are deprecated.
>However, that deprecation is generally considered to have itself been
>ill-advised. If the standard is ever revised, it's more likely the
>deprecation will be removed than the -IF-NOT functions." (PCL, p. 133)
>
>i'm (very) far from qualified to have an opinion on the matter, but i don't
>see why the -IF-NOTs would have to go...

IMO it is redundant to have both -IF and -IF-NOT versions when they
both take test predicates.  Personally I think the -IF version with a
negative test is clearer logic, but YMMV.  Either version could go
without being missed.

George
From: Joost Kremers
Subject: Re: Type checking problem
Date: 
Message-ID: <slrngc8g7n.30r.joostkremers@j.kremers4.news.arnhem.chello.nl>
George Neuner wrote:
> IMO it is redundant to have both -IF and -IF-NOT versions when they
> both take test predicates.  Personally I think the -IF version with a
> negative test is clearer logic, but YMMV.  Either version could go
> without being missed.

technically, almost everything in the language is redundant, even something
like DEFUN. it's there because it's convenient. personally, i think

(remove-if-not #'atom '(a (b c) d (e f)))

is somewhat more convenient than

(remove-if #'(lambda (x) (not (atom x))) '(a (b c) d (e f)))

although i admit the difference is negligible if the test you want to
perform is an anonymous function either way.


-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Frank Buss
Subject: Re: Type checking problem
Date: 
Message-ID: <pyu7fwyd3fcg.zqjkg1n2yjkl$.dlg@40tude.net>
Joost Kremers wrote:

> technically, almost everything in the language is redundant, even something
> like DEFUN. it's there because it's convenient. personally, i think

That's the same like with notevery. I think Peter Seibel is right that the
deprecated tag should be removed in a later version, not the functions.
When will the standard be revised? Gray streams, networking and
multithreading would be very useful to standarize.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Marco Antoniotti
Subject: Re: Type checking problem
Date: 
Message-ID: <169637d2-1934-4cc5-a849-54c374790647@l64g2000hse.googlegroups.com>
On Sep 7, 11:02 pm, Joost Kremers <············@yahoo.com> wrote:
> George Neuner wrote:
> > IMO it is redundant to have both -IF and -IF-NOT versions when they
> > both take test predicates.  Personally I think the -IF version with a
> > negative test is clearer logic, but YMMV.  Either version could go
> > without being missed.
>
> technically, almost everything in the language is redundant, even something
> like DEFUN. it's there because it's convenient. personally, i think
>
> (remove-if-not #'atom '(a (b c) d (e f)))
>
> is somewhat more convenient than
>
> (remove-if #'(lambda (x) (not (atom x))) '(a (b c) d (e f)))
>
> although i admit the difference is negligible if the test you want to
> perform is an anonymous function either way.


But that is not what you would write.  The following is more concise

     (remove-if (complement #'atom) '(a (b c) d (e f)))

If you think it's too long you can always do

     (defun neg (f) (complement f))

Cheers
--
Marco
From: Barry Margolin
Subject: Re: Type checking problem
Date: 
Message-ID: <barmar-B918E2.16335408092008@newsgroups.comcast.net>
In article 
<····································@l64g2000hse.googlegroups.com>,
 Marco Antoniotti <·······@gmail.com> wrote:

> On Sep 7, 11:02�pm, Joost Kremers <············@yahoo.com> wrote:
> > George Neuner wrote:
> > > IMO it is redundant to have both -IF and -IF-NOT versions when they
> > > both take test predicates. �Personally I think the -IF version with a
> > > negative test is clearer logic, but YMMV. �Either version could go
> > > without being missed.
> >
> > technically, almost everything in the language is redundant, even something
> > like DEFUN. it's there because it's convenient. personally, i think
> >
> > (remove-if-not #'atom '(a (b c) d (e f)))
> >
> > is somewhat more convenient than
> >
> > (remove-if #'(lambda (x) (not (atom x))) '(a (b c) d (e f)))
> >
> > although i admit the difference is negligible if the test you want to
> > perform is an anonymous function either way.
> 
> 
> But that is not what you would write.  The following is more concise
> 
>      (remove-if (complement #'atom) '(a (b c) d (e f)))
> 
> If you think it's too long you can always do
> 
>      (defun neg (f) (complement f))

Too bad NOT isn't a generic function, that calls COMPLEMENT when the 
argument is a function.  Then you could write:

(remove-if (not #'atom) ...)

Maybe we could even get away with making this incompatible change to 
NOT.  Stylistically it's preferable to use NULL rather than NOT when the 
argument is a generalized boolean.  So NOT is usually only called with T 
or NIL as the argument, and rarely with a function.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Joost Kremers
Subject: Re: Type checking problem
Date: 
Message-ID: <slrngcaq10.32b.joostkremers@j.kremers4.news.arnhem.chello.nl>
Marco Antoniotti wrote:
> But that is not what you would write.  The following is more concise
>
>      (remove-if (complement #'atom) '(a (b c) d (e f)))

well, you'd only write that if you actually know about COMPLEMENT... which
i didn't. thanks for pointing it out. ;-)


-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Stelian Ionescu
Subject: Re: Type checking problem
Date: 
Message-ID: <pan.2008.09.08.16.30.24@common-lisp.net>
On Sun, 07 Sep 2008 23:31:06 -0700, Marco Antoniotti wrote:
> But that is not what you would write.  The following is more concise
> 
>      (remove-if (complement #'atom) '(a (b c) d (e f)))

I prefer to use (remove-if-not #'atom '(a (b c) d (e f)))
and think of it as (choose-if #'atom '(a (b c) d (e f)))

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
From: Scott Burson
Subject: Re: Type checking problem
Date: 
Message-ID: <d3e30d70-6091-47c4-978d-5b1b034c4214@w1g2000prk.googlegroups.com>
On Sep 8, 9:30 am, Stelian Ionescu <········@common-lisp.net> wrote:
> On Sun, 07 Sep 2008 23:31:06 -0700, Marco Antoniotti wrote:
> > But that is not what you would write.  The following is more concise
>
> >      (remove-if (complement #'atom) '(a (b c) d (e f)))
>
> I prefer to use (remove-if-not #'atom '(a (b c) d (e f)))
> and think of it as (choose-if #'atom '(a (b c) d (e f)))

Yes, this is the operative point for me.  Both "remove" and "not" are
negatives -- it would be better to do without both of them.  Actually
I prefer the term "filter" for this operation (it's what I've used in
FSet).

-- Scott
From: Tobias C. Rittweiler
Subject: Re: Type checking problem
Date: 
Message-ID: <87iqt6js13.fsf@freebits.de>
Scott Burson <········@gmail.com> writes:

> Yes, this is the operative point for me.  Both "remove" and "not" are
> negatives -- it would be better to do without both of them.  Actually
> I prefer the term "filter" for this operation (it's what I've used in
> FSet).

I never know if FILTER is inclusive or exclusive, and have to think
twice. I hence prefer CL's explicit REMOVE-IF and REMOVE-IF-NOT.

  -T.
From: Thomas F. Burdick
Subject: Re: Type checking problem
Date: 
Message-ID: <03fb68a9-ed8b-447c-9b38-5140cb9f1120@r15g2000prh.googlegroups.com>
On 8 sep, 22:34, "Tobias C. Rittweiler" <····@freebits.de.invalid>
wrote:
> Scott Burson <········@gmail.com> writes:
> > Yes, this is the operative point for me.  Both "remove" and "not" are
> > negatives -- it would be better to do without both of them.  Actually
> > I prefer the term "filter" for this operation (it's what I've used in
> > FSet).
>
> I never know if FILTER is inclusive or exclusive, and have to think
> twice. I hence prefer CL's explicit REMOVE-IF and REMOVE-IF-NOT.

Yeah, I appreciate the logic behind -if and -if-not variants of these
sequence functions ... but remove-if-not is really an ugly name. SKILL
calls the same operation setof, which is a much better, if less
discoverable, name.
From: Björn Lindberg
Subject: Re: Type checking problem
Date: 
Message-ID: <9mpsks8gqom.fsf@muvclx01.Cadence.COM>
"Thomas F. Burdick" <········@gmail.com> writes:

> On 8 sep, 22:34, "Tobias C. Rittweiler" <····@freebits.de.invalid>
> wrote:
>> Scott Burson <········@gmail.com> writes:
>> > Yes, this is the operative point for me. �Both "remove" and "not" are
>> > negatives -- it would be better to do without both of them. �Actually
>> > I prefer the term "filter" for this operation (it's what I've used in
>> > FSet).
>>
>> I never know if FILTER is inclusive or exclusive, and have to think
>> twice. I hence prefer CL's explicit REMOVE-IF and REMOVE-IF-NOT.
>
> Yeah, I appreciate the logic behind -if and -if-not variants of these
> sequence functions ... but remove-if-not is really an ugly name. SKILL
> calls the same operation setof, which is a much better, if less
> discoverable, name.

Except that remove-if-not used on an ordered sequence would not return
a set. Also, I take issue with remove-if-not being "discoverable". :-)


Bj�rn Lindberg
From: John Thingstad
Subject: Re: Type checking problem
Date: 
Message-ID: <op.ug6k41kmut4oq5@pandora.alfanett.no>
P� Mon, 08 Sep 2008 22:28:30 +0200, skrev Scott Burson  
<········@gmail.com>:

> On Sep 8, 9:30 am, Stelian Ionescu <········@common-lisp.net> wrote:
>> On Sun, 07 Sep 2008 23:31:06 -0700, Marco Antoniotti wrote:
>> > But that is not what you would write.  The following is more concise
>>
>> >      (remove-if (complement #'atom) '(a (b c) d (e f)))
>>
>> I prefer to use (remove-if-not #'atom '(a (b c) d (e f)))
>> and think of it as (choose-if #'atom '(a (b c) d (e f)))
>
> Yes, this is the operative point for me.  Both "remove" and "not" are
> negatives -- it would be better to do without both of them.  Actually
> I prefer the term "filter" for this operation (it's what I've used in
> FSet).
>
> -- Scott

I usually have a (setf (symbol-function 'collect-if) #'remove-if-not) in  
my file somewhere.

--------------
John Thingstad
From: Thomas A. Russ
Subject: Re: Type checking problem
Date: 
Message-ID: <ymiej3u8vmo.fsf@blackcat.isi.edu>
Joost Kremers <············@yahoo.com> writes:

> (remove-if-not #'atom '(a (b c) d (e f)))
> 
> is somewhat more convenient than
> 
> (remove-if #'(lambda (x) (not (atom x))) '(a (b c) d (e f)))

But I suppose the advocates of removing REMOVE-IF-NOT would suggest that
the preferred replacement would be:

  (remove-if (complement #'atom) '(a (b c) d (e f)))

Personally, I'm all for having more options in the language.  If nothing
else, it increases the post count on these threads by giving bored lisp
programmers more ways to implement the same functionality.  ;D

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Rob Warnock
Subject: Re: Type checking problem
Date: 
Message-ID: <TuKdnR8lKZe0F1nVnZ2dnUVZ_ozinZ2d@speakeasy.net>
Kenny  <·········@gmail.com> wrote:
+---------------
| > The :test-not argument is deprecated.
+---------------

O.k., this one I could live with, given that it's almost as convenient
to use ":TEST (COMPLEMENT test)", but...

+---------------
| > The function position-if-not is deprecated.
| 
| After we revise the standard (I understand Ron, Xah, Gavino, Jon, and 
| Ilias have formed a committee) and all the implementors take those out, 
+---------------

Get real. As several people involved with the ANSI standard have
noted here numerous times, in retrospect the decision to "deprecate"
the "-IF-NOT" variants was simply *wrong*, e.g., see:

    http://groups.google.com/group/comp.lang.lisp/msg/60b5bda8223abaf2
    ...
    From: Kent M Pitman <······@world.std.com>
    ...
    I think it's generally accepted in the community that we made
    a mistake deprecating those. 

    You should use :test (complement test) rather than :test-not test.
    But for the -if-not functions, just use them and ignore the deprecation.

    Deprecated functions are still required to be supported correctly
    in all conforming implementations. 
    ...

If anything, a "revised standard" should have the *deprecations*
taken out, not the functions!!

+---------------
| where will that leave the poor noob??????????????
+---------------

Right where he/she is now.  ;-}


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Kenny
Subject: Re: Type checking problem
Date: 
Message-ID: <48c4a0eb$0$29500$607ed4bc@cv.net>
Rob Warnock wrote:
> Kenny  <·········@gmail.com> wrote:
> +---------------
> | > The :test-not argument is deprecated.
> +---------------
> 
> O.k., this one I could live with, given that it's almost as convenient
> to use ":TEST (COMPLEMENT test)", but...
> 
> +---------------
> | > The function position-if-not is deprecated.
> | 
> | After we revise the standard (I understand Ron, Xah, Gavino, Jon, and 
> | Ilias have formed a committee) and all the implementors take those out, 
> +---------------
> 
> Get real.

Yer right, we just tossed Jon from the committee.

kt
From: Slobodan Blazeski
Subject: Re: Type checking problem
Date: 
Message-ID: <87464ef4-17c3-4264-9498-ff855b36847e@c58g2000hsc.googlegroups.com>
Frank Buss wrote:
> Pascal J. Bourguignon wrote:
>
> > Frank Buss <··@frank-buss.de> writes:
> >>
> >> (not (every #'numberp '(1 2 3)))
> >
> > (position-if-not (function numberp) '(1 2 nil 3))  -> true
> > (position-if-not (function numberp) '(1 2 3))      -> NIL
> >
> > No need for NOT ;-)
>
> Yes, but my solution looks nearly as native English and is shorter :-)

Only in programming "mine's shorter" is a reason for bragging.

cheers
bobi
>
> --
> Frank Buss, ··@frank-buss.de
> http://www.frank-buss.de, http://www.it4-systems.de
From: Steven M. Haflich
Subject: Re: Type checking problem
Date: 
Message-ID: <48D0C9C0.4010401@alum.mit.edu>
Pascal J. Bourguignon wrote:

> NUMBERP is IsNumeric.

Not so.  Common Lisp includes complex numbers, which (of course) satisfy 
numberp.  IIRC Java does not standardly implement complex.


You might want instead to suggest realp (or REALP).
From: Steven M. Haflich
Subject: Re: Type checking problem
Date: 
Message-ID: <48D0C9D5.9020500@alum.mit.edu>
Pascal J. Bourguignon wrote:

> NUMBERP is IsNumeric.

Not so.  Common Lisp includes complex numbers, which (of course) satisfy 
numberp.  IIRC Java does not standardly implement complex.


You might want instead to suggest realp (or REALP).
From: Pascal Costanza
Subject: Re: Type checking problem
Date: 
Message-ID: <6ij4lcFqsqvoU1@mid.individual.net>
Frank Buss wrote:
> smartnose wrote:
> 
>> I want to check whether a list contains any nonnumericals.  If I scan
>> the list one by one and use TYPE-OF, then I have to test if an item is
>> any kind of number, e.g. a INTEGER, BIT, SINGLE-FLOAT, BIGNUM etc.
>> etc.
> 
> (not (every #'numberp '(1 2 3)))

(notevery #'numberp '(1 2 3)) is probably better.


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/