Created
January 15, 2016 22:02
-
-
Save marinbenc/421c2f7e185394e8578c to your computer and use it in GitHub Desktop.
The night I invented array subscripting
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
| //I was really tired when I wrote this: | |
| //(I later replaced it with the two lines below) | |
| // if let sound = Sound(index: soundData.soundNum, position: soundData.position) { | |
| // positions | |
| // .filter{$0.index == sound.position} | |
| // .last? | |
| // .sounds | |
| // .append(sound) | |
| // } | |
| if let sound = Sound(index: soundData.soundNum, position: soundData.position) { | |
| positions[soundData.position].sounds.append(sound) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment