ForFunction0

public final class ForFunction0

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

  • Declaration

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

    public static func extract<A>(_ fa: Kind<ForFunction0, A>) -> A