Similar to how `zip(_:_:)`

takes a tuple of `Sequence`

s and `return`

s a `Sequence`

of tuples, a `zip(_:_:_:)`

that takes a tuple of `Optional`

s and `return`

s an `Optional`

tuple would help with this:

```
func zip <Wrapped1, Wrapped2, Wrapped3> (
_ optional1: Wrapped1?,
_ optional2: Wrapped2?,
_ optional3: Wrapped3?
) -> (Wrapped1, Wrapped2, Wrapped3)? {
guard let wrapped1 = optional1,
let wrapped2 = optional2,
let wrapped3 = optional3 else {
return nil
}
return (wrapped1, wrapped2, wrapped3)
}
```

Using it in a concrete, somewhat contrived example:

```
import UIKit
extension UIColor {
convenience init (red: Int, green: Int, blue: Int) {
precondition(red >= 0 && red <= 255, "Invalid red component")
precondition(green >= 0 && green <= 255, "Invalid green component")
precondition(blue >= 0 && blue <= 255, "Invalid blue component")
self.init(
red: CGFloat(red) / 255.0,
green: CGFloat(green) / 255.0,
blue: CGFloat(blue) / 255.0,
alpha: 1.0
)
}
}
print("Pick a number between 0 and 255", terminator: ": ")
let greenComponent = readLine()
let shadeOfGreen = zip(0, Int(greenComponent), 0).map(UIColor.init(red:green:blue:))
```