count

func count<T : _CollectionType>(_: T)

Return the number of elements in x.

O(1) if T.Index is RandomAccessIndexType; O(N) otherwise.

Declaration

func count<T : _CollectionType>(x: T) -> T.Index.Distance