next up previous
Contents Next: let (SPECIAL FORM) Up: Appendix: Selected Lisp Previous: if (SPECIAL FORM)

length (FUNCTION)

Format: (length <exp> )

Required arguments: 1

<exp> must evaluate to a sequence (e.g. list, array, vector, string)

Returns the length of the given sequence.

Examples:

> (length '(1 2 3 4 5))
5

> (length "1 2 3 4 5")
9

> (length (make-array 3))
3

> (length nil)
0



© Colin Allen & Maneesh Dhagat
March 2007