Skip to content

Instantly share code, notes, and snippets.

@egoist
Created December 18, 2014 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoist/822943048ab87040d91a to your computer and use it in GitHub Desktop.
Save egoist/822943048ab87040d91a to your computer and use it in GitHub Desktop.
let interestingNumbers = [
"Prime": [2, 3, 5, 7, 11, 13],
"Fibonacci": [1, 1, 2, 3, 5, 8],
"Square": [1, 4, 9, 16, 25],
]
var largest = 0
for (kind, numbers) in interestingNumbers {
for number in numbers {
if number > largest {
largest = number
}
}
}
largest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment