Array

@frozen
struct Array<Element> : _DestructorSafeContainer
  • Provides a Fold based on the Foldable instance of this type.

    Declaration

    Swift

    static var fold: Fold<Array<Element>, Element> { get }
  • Provides a Traversal based on the Traverse instance of this type.

    Declaration

    Swift

    static var traversal: Traversal<Array<Element>, Element> { get }
  • Undocumented

    Declaration

    Swift

    public typealias EachFoci = Element
  • Declaration

    Swift

    public static var each: Traversal<Array<Element>, Element> { get }
  • Undocumented

    Declaration

    Swift

    public typealias IndexType = Int
  • Undocumented

    Declaration

    Swift

    public typealias IndexFoci = Element
  • Declaration

    Swift

    public static func index(_ i: Int) -> Optional<Array<Element>, Element>
  • Undocumented

    Declaration

    Swift

    public typealias FilterIndexType = Int
  • Undocumented

    Declaration

    Swift

    public typealias FilterIndexFoci = Element
  • Declaration

    Swift

    public static func filter(_ predicate: @escaping (Int) -> Bool) -> Traversal<Array<Element>, Element>
  • Undocumented

    Declaration

    Swift

    public typealias First = Element
  • Declaration

    Swift

    public static var cons: Prism<Array<Element>, (Element, Array<Element>)> { get }
  • Undocumented

    Declaration

    Swift

    public typealias Last = Element
  • Declaration

    Swift

    public static var snoc: Prism<Array<Element>, (Array<Element>, Element)> { get }
  • Provides a polymorphic Iso between Array and ArrayK

    Declaration

    Swift

    static func toPArrayK<B>() -> PIso<Array<Element>, Array<B>, ArrayK<Element>, ArrayK<B>>

    Return Value

    A polymorphic Iso between Array and ArrayK

  • Provides an Iso between Array and ArrayK

    Declaration

    Swift

    static var toArrayK: Iso<Array<Element>, ArrayK<Element>> { get }
  • Provides an Optional to retrieve the first element of an Array

    Declaration

    Swift

    static var head: Optional<Array<Element>, Element> { get }
  • Provides an Optional to retrieve the tail of an Array.

    Declaration

    Swift

    static var tail: Optional<Array<Element>, Array<Element>> { get }
  • Creates an ArrayK from this array.

    Declaration

    Swift

    func k() -> ArrayK<Element>

    Return Value

    An ArrayK wrapping this array.