Skip to content

Instantly share code, notes, and snippets.

@RonJeffries
Last active August 29, 2015 14:02
Show Gist options
  • Save RonJeffries/aa000a376d18aefae27d to your computer and use it in GitHub Desktop.
Save RonJeffries/aa000a376d18aefae27d to your computer and use it in GitHub Desktop.
Swift language bowling with Tuples. Interesting ...
func score() -> Int {
var sum = 0
var index = 0
for frame in 1...10 {
var (score, step) = frameScore(index)
sum += score
index += step
}
return sum
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment