Skip to content

Instantly share code, notes, and snippets.

@joanmolinas
Created March 8, 2018 19:17
Show Gist options
  • Save joanmolinas/2d26858fbe52ca980314f8996e887d05 to your computer and use it in GitHub Desktop.
Save joanmolinas/2d26858fbe52ca980314f8996e887d05 to your computer and use it in GitHub Desktop.
class Team {
var runners: [Runner] = ...
var riders: [Rider] = ...
func reset() {
runners.forEach{ $0.reset() }
riders.forEach { $0.reset() }
}
}
class Runner {
func reset() {
// Do stuff
}
}
class Rider {
func reset() {
// Do stuff
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment