ztn-zotan-swift-algorithms/Guides
2025-01-14 12:42:37 -06:00
..
Resources/SortedPrefix [ImgBot] Optimize images (#133) 2021-04-29 15:49:40 -05:00
AdjacentPairs.md [Docs] Add link and remove redundant doc line 2023-10-31 20:25:50 -04:00
Chain.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Chunked.md Correct Chunked documentation (#182) 2023-08-02 10:18:17 -05:00
Combinations.md [Docs] Add link and remove redundant doc line 2023-10-31 20:25:50 -04:00
Compacted.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Cycle.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
EndsWith.md Add ends(with:) (#224) 2025-01-14 12:42:37 -06:00
FirstNonNil.md Expand the firstNonNil(_:) docs (#115) 2021-03-29 19:18:56 +02:00
Grouped.md Add grouped(by:) and keyed(by:) (#197) 2023-11-07 14:29:10 -06:00
Indexed.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Intersperse.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Joined.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Keyed.md Fix typos (#222) 2024-02-07 00:18:57 -06:00
MinMax.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Partition.md Add partitioned(by:) (#152) 2021-10-20 22:21:39 +02:00
Permutations.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Product.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
RandomSampling.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
README.md Documentation improvements 2023-11-14 21:50:39 -06:00
Reductions.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Rotate.md Rename rotate(at:) to rotate(toStartAt:) 2020-10-09 10:50:16 -05:00
Split.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Stride.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Suffix.md Update Suffix.md 2024-04-12 16:09:42 +08:00
Trim.md Update guide/docs/tests. 2023-11-14 13:00:34 -06:00
Unique.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00
Windows.md Prepare for Swift Algorithms 1.0 (#167) 2021-09-09 01:01:36 +02:00

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