opened
tcurdt
username_0
What I was wishing for:
```
all(promiseA,promiseB).then { resultA, resultB in
}
```
Based on the docs it would have to be
```
all(promiseA,promiseB).then { result in
  let resultA = result[0]
  let resultB = result[1]
}
```
or
```
Promise<Void>.zip(promiseA, promiseB).then { resultA, resultB in
}
```
Any thoughts?
nicer all 
issue
created
tcurdt
username_0
Actually
```
        let (resultA,resultB) = await(Promise<Void>.zip(
          promiseA,
          promiseB
        ))

        print(resultA)
        print(resultB)
```
isn't so bad - except for the `Promise<Void>`.
Wondering if that could be turned into just `Promise.zip` though.
comment
created
dalu93
username_1
@username_0 wouldn't your suggestion require `n` number of `all` method declaration, one for each different number of tuple elements/parameters?
comment
created
tcurdt
username_0
I suppose it would require that. At least I am not aware that exploding on the `in` is possible with Swift (yet) - because then it could be just like this:

```
all(promiseA,promiseB).then { (resultA, resultB) in
}
```

That's said - other libraries just do the pragmatic thing in such a case and cover the e.g. `n<10` cases.
comment
created
r-plus
username_2
If `zip` static functions changed to global function like `all`, we no longer necessary type `Promise<Void>` to use zip.

`Promise` class is not adapted to `Sequence` protocol, so not happen ambiguous compile error with [zip(sequence1, sequence2)](https://developer.apple.com/documentation/swift/1541125-zip#) function even if Hydra implement zip global functions.

@username_3 What do you think about it?
comment
created
malcommac
username_3
@username_2 I think its the better choice; I've changed it here: https://github.com/username_3/Hydra/commit/b9568eff1dc799d7c25a211d529ef1058780b787.
comment