This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Check if its number

3 posts · 1967 views

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

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

thank you