Skip to content

Instantly share code, notes, and snippets.

@robb
Forked from rnapier/underscore.m
Last active August 29, 2015 13:56
Show Gist options
  • Save robb/8946940 to your computer and use it in GitHub Desktop.
Save robb/8946940 to your computer and use it in GitHub Desktop.
// No blocks-as-properties, just classic arguments
NSArray *tweets = [[[[[Underscore
array:results]
filter:Underscore.isDictionary]
reject:^(NSDictionary *tweet) {
return [tweet[@"iso_language_code"] isEqualToString:@"en"];
}]
map:^(NSDictionary *tweet) {
NSString *name = tweet[@"from_user_name"];
NSString *text = tweet[@"text"];
return [NSString stringWithFormat:@"%@: %@", name, text];
}];
unwrap];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment