Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tuple enumeration
/** The returned generator will enumerate each value of the provided tuple. */
func generatorForTuple(tuple: Any) -> AnyGenerator<Any> {
return anyGenerator(Mirror(reflecting: tuple) { $0.value }.generate())
// Blogged at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment