Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 6.29 KB

README.md

File metadata and controls

53 lines (39 loc) · 6.29 KB

Guides

These guides describe the design and intention behind the APIs included in the Algorithms library. For further reading, see the announcement on swift.org and the official documentation.

Contents

Combinations / permutations

Mutating algorithms

Combining collections

  • chain(_:_:): Concatenates two collections with the same element type.
  • cycled(), cycled(times:): Repeats the elements of a collection forever or a set number of times.
  • joined(by:): Concatenate sequences of sequences, using an element or sequence as a separator, or using a closure to generate each separator.
  • product(_:_:): Iterates over all the pairs of two collections; equivalent to nested for-in loops.

Subsetting operations

Partial sorting

Other useful operations