Skip to content

Instantly share code, notes, and snippets.

@seivan
Last active December 20, 2015 21:59
Show Gist options
  • Select an option

  • Save seivan/6201545 to your computer and use it in GitHub Desktop.

Select an option

Save seivan/6201545 to your computer and use it in GitHub Desktop.
NSMutableArray * playerIdentifiers = @[].mutableCopy;
[matches SH_each:^(GKTurnBasedMatch * match) {
[playerIdentifiers addObjectsFromArray:match.SH_playerIdentifiers];
}];
NSArray * playerIdentifiers = [matches SH_reduceValue:@[] withBlock:^id(NSArray * memo, GKTurnBasedMatch * obj) {
return [memo arrayByAddingObjectsFromArray:obj.SH_playerIdentifiers];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment