ForId

public final class ForId

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

  • Declaration

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

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