Syntax | (count list) → number of items |
---|---|
Arguments | list: A list elements you want to count. |
Returns | integer: The number of elements in the list. |
Category | list |
Description | Counts how many elements are in the list and returns that number. It doesn't care what the elements are they can even be other lists. |
(count '(1 1 1 1))
This will return the number four.
(count '((1 a b) Nil (la Nil)))
This will return the number three (even if two are lists and one is Nil)
(count "Hello")
This will return the number 5. Count works on strings too, and returns the number of chars in the string. Return to Functions list