Registered forum members do not see this ad.
Or using a similar approach as Tharwat's in post #4:Code:ECL-0.9i % (setq count 0) 0 ECL-0.9i % (loop for item in '(1 3 6 "34" 5 "name") do (if (stringp item) (setq count (1+ count)))) NIL ECL-0.9i % count 2
Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!
Registered forum members do not see this ad.
Sorry... the OP didn't use strings, only symbols.
Code:ECL-0.9i % (length (remove-if (lambda (a) (numberp a)) '(8 0 b 7 h u 6 d ))) 4 ECL-0.9i % (setq count 0) 0 ECL-0.9i % (loop for item in '(8 0 b 7 h u 6 d ) do (if (not (numberp item)) (setq count (1+ count)))) NIL ECL-0.9i % count 4
Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!
Bookmarks