Created
March 8, 2018 19:17
-
-
Save joanmolinas/2d26858fbe52ca980314f8996e887d05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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