John, please clarify what is expected on an empty list.
I guess, if '(1 2 3 4 5 6 7) -> 6, then '(1) -> 0 and '() - > nil
The 'native' length function does not work this way.
(length '(1 2 3 4 5 6 7)) -> 7
(length '(1)) - > 1
(length '()) -> 0
I agree. See Edit note in my first post. John decided to have it that way.
Acknowledged but if you are using/building this function in a larger procedure you may want to control flow via an conditional like IF or COND ?easier?.
(if (my-count-list aList) ...
Well, I play for the fun, but I don't see where this function might be used
(if (my-count-list aList) ... is similar to (if aList.