Skip to content

Instantly share code, notes, and snippets.

@mwrites
Created February 28, 2018 08:55
Show Gist options
  • Save mwrites/345693ede5b0aabd9a075bdbce66a511 to your computer and use it in GitHub Desktop.
Save mwrites/345693ede5b0aabd9a075bdbce66a511 to your computer and use it in GitHub Desktop.
Enumerating Two Collections In Parallel
for (a, b) in zip(A.enumerated(), B.enumerated()) {
print("a[\(a.offset)]: \(a.element)")
print("b[\(b.offset)]: \(b.element)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment