count


count(s)
      

Return the number of elements in the sequence s. Raise an error if s is not a valid sequence or if s is an infinite sequence.

Count is a generic function recognized by the language. A user-defined object can respond to the 'count message and start behaving like a sequence. (See the documentation on first for an example).

Examples:


count([\a, \e, \i, \o, \u])
// 5
      

Also see:

first
rest


Core Module Index | Contents