New
Swift Algorithms 1.0.0
Swift Algorithms is now source stable!
Changes
- Most sequence and collection types have been renamed, following a more consistent naming structure:
- The
Lazyprefix was dropped. - Either a
SequenceorCollectionsuffix was added depending on whether or not the type is unconditionally a collection. - The base name was derived from the name of the method that produces it, including an argument label to disambiguate if necessary.
- The
- Types that can only be produced from a lazy sequence chain now unconditionally conform to
LazySequenceProtocoland wrap the base sequence instead of the lazy wrapper, making some return types slightly simpler.- e.g.
[1, 2, 3].lazy.reductions(+)now returnsExclusiveReductionsSequence<[Int]>, notExclusiveReductionsSequence<LazySequence<[Int]>>.
- e.g.
- The generic parameters of the
ExclusiveReductionstype have been swapped, putting the base collection first and the result type second. - The
Indicesassociated type of now matches .