This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: @schwa figured this out, but I'm claiming some of the credit for asking the question. | |
// See https://gist.github.com/schwa/ecd5f8c154e60fcb0f58 for the original solution. | |
// Playground - noun: a place where people can play | |
import Foundation | |
// Implementation (repeat as needed for number of parameters). | |
func unwrap<T1, T2>(p1: T1?, p2: T2?) -> (T1, T2)? { |