Future

open class Future<A> : FutureType

Abstract Future class that all FutureTypes should extend from

  • Transform Self.Element

    Declaration

    Swift

    public func map<B>(_ transform: @escaping Function<A, B>) -> Future<B>

    Parameters

    transform

    closure that takes Self.Element and returns F.Element

    Return Value

    Future that maps Self to F

  • Transform Self.Element

    Declaration

    Swift

    public func flatMap<B>(_ transform: @escaping Function<A, Future<B>>) -> Future<B>

    Parameters

    transform

    closure that takes Self.Element and returns a Future

    Return Value

    the Future given by executing transform