Page 1 of 1

Check if its number

Posted: Mon Mar 21, 2011 4:49 pm
by vasko
I need help with function that checks if all elements are numbers

for example:


(checkn '(1 2 3 a 4 5)) -> ()
(checkn '((1 2) 3 ((4 (1 2) a) 6 b))) -> ()
(checkn '((1 2) 3 ((4 (1 2) a) 6 b))) -> t

Re: Check if its number

Posted: Mon Mar 21, 2011 6:11 pm
by nuntius
Look up NUMBERP in the Numbers Dictionary.

Chapters 5 and 6 each have solutions for using this on lists of data.

Re: Check if its number

Posted: Tue Mar 22, 2011 3:22 am
by vasko
thank you