Extensions

The following extensions are available globally.

  • Returns a tuple of the prefix and suffix of self, the first element being the prefix up to n.

    See more

    Declaration

    Swift

    protocol CollectionType : Indexable, SequenceType
  • Returns a lazy sequence of self, chunked into arrays of adjacent equal values “`swift [1, 2, 2, 3, 1, 1, 3, 4, 2].lazy.group()

    [1], [2, 2], [3], [1, 1], [3], [4], [2] ”`

    See more

    Declaration

    Swift

    protocol LazySequenceType : SequenceType