Functor

public protocol Functor : Invariant

Undocumented

  • Undocumented

    Declaration

    Swift

    static func map<A, B>(_ fa: Kind<Self, A>, _ f: @escaping (A) -> B) -> Kind<Self, B>
  • hylo(_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func hylo<A, B>(_ algebra : @escaping Algebra<Self, Eval<B>>,
                           _ coalgebra : @escaping Coalgebra<Self, A>,
                           _ a : A) -> B
  • imap(_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func imap<A, B>(_ fa: Kind<Self, A>, _ f: @escaping (A) -> B, _ g: @escaping (B) -> A) -> Kind<Self, B>
  • lift(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func lift<A, B>(_ f : @escaping (A) -> B) -> (Kind<Self, A>) -> Kind<Self, B>
  • void(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func void<A>(_ fa: Kind<Self, A>) -> Kind<Self, ()>
  • fproduct(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func fproduct<A, B>(_ fa : Kind<Self, A>, _ f : @escaping (A) -> B) -> Kind<Self, (A, B)>
  • as(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func `as`<A, B>(_ fa: Kind<Self, A>, _ b: B) -> Kind<Self, B>
  • tupleLeft(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func tupleLeft<A, B>(_ fa: Kind<Self, A>, _ b: B) -> Kind<Self, (B, A)>
  • tupleRight(_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func tupleRight<A, B>(_ fa: Kind<Self, A>, _ b: B) -> Kind<Self, (A, B)>