Fold

open class Fold<S, A> : FoldOf<S, A>

Undocumented

  • Undocumented

    Declaration

    Swift

    public static func identity() -> Fold<A, A>
  • Undocumented

    Declaration

    Swift

    public static func codiagonal() -> Fold<Either<S, S>, S>
  • Undocumented

    Declaration

    Swift

    public static func select(_ predicate: @escaping (S) -> Bool) -> Fold<S, S>
  • Undocumented

    Declaration

    Swift

    public static func void() -> Fold<S, A>
  • Undocumented

    Declaration

    Swift

    public static func fromFoldable<F>() -> Fold<Kind<F, S>, S> where F : Foldable
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Fold<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Iso<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Getter<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Lens<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Prism<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Optional<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public static func + <C>(lhs: Fold<S, A>, rhs: Traversal<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    open func foldMap<R: Monoid>(_ s: S, _ f: @escaping (A) -> R) -> R
  • Undocumented

    Declaration

    Swift

    public func size(_ s: S) -> Int
  • Undocumented

    Declaration

    Swift

    public func forAll(_ s: S, _ predicate: @escaping (A) -> Bool) -> Bool
  • Undocumented

    Declaration

    Swift

    public func isEmpty(_ s: S) -> Bool
  • Undocumented

    Declaration

    Swift

    public func nonEmpty(_ s: S) -> Bool
  • Undocumented

    Declaration

    Swift

    public func headOption(_ s: S) -> Option<A>
  • Undocumented

    Declaration

    Swift

    public func lastOption(_ s: S) -> Option<A>
  • Undocumented

    Declaration

    Swift

    public func getAll(_ s: S) -> ArrayK<A>
  • Undocumented

    Declaration

    Swift

    public func choice<C>(_ other: Fold<C, A>) -> Fold<Either<S, C>, A>
  • Undocumented

    Declaration

    Swift

    public func left<C>() -> Fold<Either<S, C>, Either<A, C>>
  • Undocumented

    Declaration

    Swift

    public func right<C>() -> Fold<Either<C, S>, Either<C, A>>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Fold<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Iso<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Getter<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Lens<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Prism<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Optional<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func compose<C>(_ other: Traversal<A, C>) -> Fold<S, C>
  • Undocumented

    Declaration

    Swift

    public func find(_ s: S, _ predicate: @escaping (A) -> Bool) -> Option<A>
  • Undocumented

    Declaration

    Swift

    public func exists(_ s: S, _ predicate: @escaping (A) -> Bool) -> Bool
  • Undocumented

    Declaration

    Swift

    func at<AtType, I, T>(_ at: AtType, _ i: I) -> Fold<S, T> where A == AtType.S, AtType : At, I == AtType.I, T == AtType.A
  • Undocumented

    Declaration

    Swift

    func every<EachType, T>(_ each: EachType) -> Fold<S, T> where A == EachType.S, EachType : Each, T == EachType.A
  • Undocumented

    Declaration

    Swift

    func fold(_ s: S) -> A
  • Undocumented

    Declaration

    Swift

    func combineAll(_ s: S) -> A