ForOption

public final class ForOption

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

  • Declaration

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

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

    Swift

    public static func empty<A>() -> Kind<ForOption, A>
  • Declaration

    Swift

    public static func emptyK<A>() -> Kind<ForOption, A>
  • Declaration

    Swift

    public static func product<A, B>(_ a: Kind<ForOption, A>, _ b: Kind<ForOption, B>) -> Kind<ForOption, (A, B)>
  • Declaration

    Swift

    public static func identity<A>() -> Kind<ForOption, A>