Files
Graham Lee 9ead8781d4 Add .docc catalog to publish stdlib docs on swift.org
Co-authored-by: Alex Martini <amartini@apple.com>
Co-authored-by: Graham Lee <glee23@apple.com>
Co-authored-by: Chris Adamson <cadamson@apple.com>
Co-authored-by: Kirby Turner <kirby_turner@apple.com>
Co-authored-by: Paris Pinkney <ppinkney@apple.com>
Co-authored-by: Dave Spector <dspector@apple.com>
Co-authored-by: Sofia Rodriguez Morales <sofia_rodriguez@apple.com>
Co-authored-by: Ethan Kusters <ekusters@apple.com>
Co-authored-by: Goli Mohammadi <g_mohammadi@apple.com>
Co-authored-by: Adora Vaz <a_vaz@apple.com>
Co-authored-by: David Rönnqvist <ronnqvist@apple.com>
Co-authored-by: Nate Merseth Cook <natecook@apple.com>
Co-authored-by: Susan Conant <susan_c@apple.com>
2026-04-10 10:04:56 -04:00

1.2 KiB

Collections

Store and organize data using arrays, dictionaries, sets, and other data structures.

Topics

Arrays and Dictionaries

  • Swift/Array
  • Swift/Dictionary
  • Swift/InlineArray

Sets

  • Swift/Set
  • Swift/OptionSet-protocol

Ranges

Create a collection of all the values in a range by using the half-open (..<) and closed (...) range operators.

  • Swift/Comparable/..<(_:_:)
  • Swift/Range
  • Swift/RangeSet
  • Swift/Comparable/...(_:_:)
  • Swift/ClosedRange

Strides

Create a stride that steps over values between two boundaries using the stride(from:to:by:) and stride(from:through:by:) functions.

  • Swift/stride(from:to:by:)
  • Swift/stride(from:through:by:)

Special-Use Collections

These collections can store zero, one, or many of the same element.

  • Swift/repeatElement(_:count:)
  • Swift/CollectionOfOne
  • Swift/EmptyCollection
  • Swift/KeyValuePairs
  • Swift/DictionaryLiteral

Dynamic Sequences

  • Swift/sequence(first:next:)
  • Swift/sequence(state:next:)

Joint Iteration

  • Swift/zip(_:_:)

Advanced Collection Topics