Skip to content

Instantly share code, notes, and snippets.

@jarsen
Last active December 16, 2015 20:59
Show Gist options
  • Save jarsen/5496643 to your computer and use it in GitHub Desktop.
Save jarsen/5496643 to your computer and use it in GitHub Desktop.
// old way
- (NSMutableArray *)sections {
if (!_sections) {
_sections = [NSMutableArray new];
}
return _sections;
}
// cool new way
- (NSMutableArray *)sections {
return _sections = _sections ?: [NSMutableArray new];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment