robb/Underscore.m — pull request #19 by akinsella (2012-10-27 18:57:02+00:00)
Title: Add of support for 'unique' method on array wrapper

Hi,

I added some support for 'unique' method on array wrapper.

Here is a sample:

NSURL *fbReposUrl = [NSURL URLWithString:@"https://api.github.com/orgs/facebook/repos"];
NSData *data = [NSData dataWithContentsOfURL:fbReposUrl];
NSArray *repos = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:NULL];

NSArray *languages = _array(repos).pluck(@"language").reject([Underscore isNull]).unique.unwrap;

NSLog(@"Unique languages used by FaceBook: %@", languages);