length

Returns the size/length of a finite structure as an Int. The default implementation just counts elements starting with the left-most. Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.

Examples

Basic usage:
>>> length []
0
>>> length ['a', 'b', 'c']
3

>>> length [1..]
* Hangs forever *
Number of elements in NonEmpty list.
length returns the length of a finite list as an Int. It is an instance of the more general genericLength, the result type of which may be any kind of number.
>>> length []
0

>>> length ['a', 'b', 'c']
3

>>> length [1..]
* Hangs forever *
O(1) length returns the length of a ByteString as an Int.
O(c) length returns the length of a ByteString as an Int64
O(1) The length of a ShortByteString.
The number of elements in the sequence.
O(n) Returns the number of characters in a Text. Subject to fusion.
O(n) Returns the number of characters in a text.
O(n) Returns the number of characters in a Text. Subject to fusion.
Returns the size/length of a finite structure as an Int. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.
O(1) Yield the length of the vector
Length of a Bundle
Length of a Bundle
Length of a Stream
O(1) Yield the length of the vector
Length of the mutable vector.
Length of the mutable vector.
O(1) Yield the length of the vector
Length of the mutable vector.
O(1) Yield the length of the vector
Length of the mutable vector.
O(1) Yield the length of the vector
Length of the mutable vector.