NSArray* aArray = @[@"a", @"b", @"c", @"d"]; NSArray* bArray = @[@"b", @"c", @"d", @"e", @"f"]; NSArray* newArray = [aArray difference:bArray]; NSLog(@"diff : %@", [newArray description]); /* diff : a, e, f */ @implementation NSArray (Difference) - (NSArray*)difference:(NSArray*)otherArray { NSMutableOrderedSet* allSet = [NSMutableOrderedSet orderedSetWithArray:self]; [allSet addObjectsFromArray:o