ForSingleK

public final class ForSingleK

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

  • Declaration

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

    public typealias E = Error
  • Declaration

    Swift

    public static func raiseError<A>(_ e: Error) -> Kind<ForSingleK, A>
  • Declaration

    Swift

    public static func handleErrorWith<A>(_ fa: Kind<ForSingleK, A>, _ f: @escaping (Error) -> Kind<ForSingleK, A>) -> Kind<ForSingleK, A>
  • Declaration

    Swift

    public static func `defer`<A>(_ fa: @escaping () -> Kind<ForSingleK, A>) -> Kind<ForSingleK, A>
  • Declaration

    Swift

    public static func asyncF<A>(_ procf: @escaping (@escaping (Either<Error, A>) -> ()) -> Kind<ForSingleK, ()>) -> Kind<ForSingleK, A>
  • Declaration

    Swift

    public static func continueOn<A>(_ fa: Kind<ForSingleK, A>, _ queue: DispatchQueue) -> Kind<ForSingleK, A>
  • Undocumented

    Declaration

    Swift

    public static func runAsync<A>(_ fa: @escaping ((Either<Error, A>) -> ()) throws -> ()) -> Kind<ForSingleK, A>
  • Declaration

    Swift

    public static func runAsync<A>(_ fa: Kind<ForSingleK, A>, _ callback: @escaping (Either<Error, A>) -> Kind<ForSingleK, ()>) -> Kind<ForSingleK, ()>
  • Declaration

    Swift

    public static func parMap<A, B, Z>(_ fa: Kind<ForSingleK, A>, _ fb: Kind<ForSingleK, B>, _ f: @escaping (A, B) -> Z) -> Kind<ForSingleK, Z>
  • Declaration

    Swift

    public static func parMap<A, B, C, Z>(_ fa: Kind<ForSingleK, A>, _ fb: Kind<ForSingleK, B>, _ fc: Kind<ForSingleK, C>, _ f: @escaping (A, B, C) -> Z) -> Kind<ForSingleK, Z>