Concurrent

public protocol Concurrent : Async

Concurrent describes asynchronous operations that can be started concurrently.

  • Runs 2 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

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

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • Runs 3 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

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

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • parZip(_:_:) Extension method

    Runs 2 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B>(_ fa: Kind<Self, A>,
                             _ fb: Kind<Self, B>) -> Kind<Self, (A, B)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    Return Value

    A computation that describes the parallel execution.

  • parZip(_:_:_:) Extension method

    Runs 3 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C>(_ fa: Kind<Self, A>,
                                _ fb: Kind<Self, B>,
                                _ fc: Kind<Self, C>) -> Kind<Self, (A, B, C)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    Return Value

    A computation that describes the parallel execution.

  • parZip(_:_:_:_:) Extension method

    Runs 4 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C, D>(_ fa: Kind<Self, A>,
                                   _ fb: Kind<Self, B>,
                                   _ fc: Kind<Self, C>,
                                   _ fd: Kind<Self, D>) -> Kind<Self, (A, B, C, D)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    Return Value

    A computation that describes the parallel execution.

  • parZip(_:_:_:_:_:) Extension method

    Runs 5 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C, D, E>(_ fa: Kind<Self, A>,
                                      _ fb: Kind<Self, B>,
                                      _ fc: Kind<Self, C>,
                                      _ fd: Kind<Self, D>,
                                      _ fe: Kind<Self, E>) -> Kind<Self, (A, B, C, D, E)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    Return Value

    A computation that describes the parallel execution.

  • parZip(_:_:_:_:_:_:) Extension method

    Runs 6 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C, D, E, G>(_ fa: Kind<Self, A>,
                                         _ fb: Kind<Self, B>,
                                         _ fc: Kind<Self, C>,
                                         _ fd: Kind<Self, D>,
                                         _ fe: Kind<Self, E>,
                                         _ fg: Kind<Self, G>) -> Kind<Self, (A, B, C, D, E, G)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    Return Value

    A computation that describes the parallel execution.

  • parZip(_:_:_:_:_:_:_:) Extension method

    Runs 7 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C, D, E, G, H>(_ fa: Kind<Self, A>,
                                            _ fb: Kind<Self, B>,
                                            _ fc: Kind<Self, C>,
                                            _ fd: Kind<Self, D>,
                                            _ fe: Kind<Self, E>,
                                            _ fg: Kind<Self, G>,
                                            _ fh: Kind<Self, H>) -> Kind<Self, (A, B, C, D, E, G, H)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    fh

    7th computation.

    Return Value

    A computation that describes the parallel execution.

  • Runs 8 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C, D, E, G, H, I>(_ fa: Kind<Self, A>,
                                               _ fb: Kind<Self, B>,
                                               _ fc: Kind<Self, C>,
                                               _ fd: Kind<Self, D>,
                                               _ fe: Kind<Self, E>,
                                               _ fg: Kind<Self, G>,
                                               _ fh: Kind<Self, H>,
                                               _ fi: Kind<Self, I>) -> Kind<Self, (A, B, C, D, E, G, H, I)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    fh

    7th computation.

    fi

    8th computation.

    Return Value

    A computation that describes the parallel execution.

  • Runs 9 computations in parallel and tuples their results.

    Declaration

    Swift

    static func parZip<A, B, C, D, E, G, H, I, J>(_ fa: Kind<Self, A>,
                                                  _ fb: Kind<Self, B>,
                                                  _ fc: Kind<Self, C>,
                                                  _ fd: Kind<Self, D>,
                                                  _ fe: Kind<Self, E>,
                                                  _ fg: Kind<Self, G>,
                                                  _ fh: Kind<Self, H>,
                                                  _ fi: Kind<Self, I>,
                                                  _ fj: Kind<Self, J>) -> Kind<Self, (A, B, C, D, E, G, H, I, J)>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    fh

    7th computation.

    fi

    8th computation.

    fj

    9th computation.

    Return Value

    A computation that describes the parallel execution.

  • parMap(_:_:_:_:_:) Extension method

    Runs 4 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

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

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • parMap(_:_:_:_:_:_:) Extension method

    Runs 5 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

    static func parMap<A, B, C, D, E, Z>(_ fa: Kind<Self, A>,
                                         _ fb: Kind<Self, B>,
                                         _ fc: Kind<Self, C>,
                                         _ fd: Kind<Self, D>,
                                         _ fe: Kind<Self, E>,
                                         _ f: @escaping (A, B, C, D, E) -> Z) -> Kind<Self, Z>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • parMap(_:_:_:_:_:_:_:) Extension method

    Runs 6 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

    static func parMap<A, B, C, D, E, G, Z>(_ fa: Kind<Self, A>,
                                            _ fb: Kind<Self, B>,
                                            _ fc: Kind<Self, C>,
                                            _ fd: Kind<Self, D>,
                                            _ fe: Kind<Self, E>,
                                            _ fg: Kind<Self, G>,
                                            _ f: @escaping (A, B, C, D, E, G) -> Z) -> Kind<Self, Z>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • Runs 7 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

    static func parMap<A, B, C, D, E, G, H, Z>(_ fa: Kind<Self, A>,
                                               _ fb: Kind<Self, B>,
                                               _ fc: Kind<Self, C>,
                                               _ fd: Kind<Self, D>,
                                               _ fe: Kind<Self, E>,
                                               _ fg: Kind<Self, G>,
                                               _ fh: Kind<Self, H>,
                                               _ f: @escaping (A, B, C, D, E, G, H) -> Z) -> Kind<Self, Z>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    fh

    7th computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • Runs 8 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

    static func parMap<A, B, C, D, E, G, H, I, Z>(_ fa: Kind<Self, A>,
                                                  _ fb: Kind<Self, B>,
                                                  _ fc: Kind<Self, C>,
                                                  _ fd: Kind<Self, D>,
                                                  _ fe: Kind<Self, E>,
                                                  _ fg: Kind<Self, G>,
                                                  _ fh: Kind<Self, H>,
                                                  _ fi: Kind<Self, I>,
                                                  _ f: @escaping (A, B, C, D, E, G, H, I) -> Z) -> Kind<Self, Z>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    fh

    7th computation.

    fi

    8th computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.

  • Runs 9 computations in parallel and combines their results using the provided function.

    Declaration

    Swift

    static func parMap<A, B, C, D, E, G, H, I, J, Z>(_ fa: Kind<Self, A>,
                                                     _ fb: Kind<Self, B>,
                                                     _ fc: Kind<Self, C>,
                                                     _ fd: Kind<Self, D>,
                                                     _ fe: Kind<Self, E>,
                                                     _ fg: Kind<Self, G>,
                                                     _ fh: Kind<Self, H>,
                                                     _ fi: Kind<Self, I>,
                                                     _ fj: Kind<Self, J>,
                                                     _ f: @escaping (A, B, C, D, E, G, H, I, J) -> Z) -> Kind<Self, Z>

    Parameters

    fa

    1st computation.

    fb

    2nd computation.

    fc

    3rd computation.

    fd

    4th computation.

    fe

    5th computation.

    fg

    6th computation.

    fh

    7th computation.

    fi

    8th computation.

    fj

    9th computation.

    f

    Combination function.

    Return Value

    A computation that describes the parallel execution.