Collection

extension Collection
  • Returns the element at the specified index if it is within bounds, otherwise nil.

    Declaration

    Swift

    public subscript(safe index: Index) -> Element? { get }

Parallel Map

  • Parallels mapping using RecursiveLock.

    Declaration

    Swift

    public func parallelMap<R>(_ transform: @escaping (Element) -> R) -> [R]

    Return Value

    An array containing the results of mapping the given closure over the sequence’s elements.