ForNonEmptyArray

public final class ForNonEmptyArray

Witness for the NonEmptyArray<A> data type. To be used in simulated Higher Kinded Types.

  • Declaration

    Swift

    public static func eq<A>(_ lhs: Kind<ForNonEmptyArray, A>, _ rhs: Kind<ForNonEmptyArray, A>) -> Bool where A : Equatable
  • Declaration

    Swift

    public static func map<A, B>(_ fa: Kind<ForNonEmptyArray, A>, _ f: @escaping (A) -> B) -> Kind<ForNonEmptyArray, B>
  • Declaration

    Swift

    public static func pure<A>(_ a: A) -> Kind<ForNonEmptyArray, A>
  • Declaration

    Swift

    public static func flatMap<A, B>(_ fa: Kind<ForNonEmptyArray, A>, _ f: @escaping (A) -> Kind<ForNonEmptyArray, B>) -> Kind<ForNonEmptyArray, B>
  • Declaration

    Swift

    public static func tailRecM<A, B>(_ a: A, _ f: @escaping (A) -> Kind<ForNonEmptyArray, Either<A, B>>) -> Kind<ForNonEmptyArray, B>
  • Declaration

    Swift

    public static func coflatMap<A, B>(_ fa: Kind<ForNonEmptyArray, A>, _ f: @escaping (Kind<ForNonEmptyArray, A>) -> B) -> Kind<ForNonEmptyArray, B>
  • Declaration

    Swift

    public static func extract<A>(_ fa: Kind<ForNonEmptyArray, A>) -> A
  • Declaration

    Swift

    public static func foldLeft<A, B>(_ fa: Kind<ForNonEmptyArray, A>, _ b: B, _ f: @escaping (B, A) -> B) -> B
  • Declaration

    Swift

    public static func foldRight<A, B>(_ fa: Kind<ForNonEmptyArray, A>, _ b: Eval<B>, _ f: @escaping (A, Eval<B>) -> Eval<B>) -> Eval<B>
  • Declaration

    Swift

    public static func combineK<A>(_ x: Kind<ForNonEmptyArray, A>, _ y: Kind<ForNonEmptyArray, A>) -> Kind<ForNonEmptyArray, A>