Re: [CS3304_1381] determining if an atom is a number

New Message Reply About this list Date view Thread view Subject view Author view

Nathan Conklin (Nathan.Conklin@VT.EDU)
Mon, 6 Mar 2000 20:28:13 -0500


Message-ID:  <200003070128.UAA22779@e115101.vtacs.com>
Date:         Mon, 6 Mar 2000 20:28:13 -0500
From: Nathan Conklin <Nathan.Conklin@VT.EDU>
Subject:      Re: [CS3304_1381] determining if an atom is a number

>
> what want to do is:
> lis = (74 * 3)
> (isNumber (car lis)) -> #T
> (isNumber (cadr lis)) -> ()
>

You should be able to use the number? predicate:

==> (number? '3)

#t
==> (number? 'a)

#f
==> (number? '(3 2))

#f

--
Nathan Conklin
Nathan.Conklin@vt.edu
540-953-2254


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Mon Mar 06 2000 - 20:38:19 EST