Skip to content

Commit

Permalink
Add sum to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinEberhardt committed May 3, 2015
1 parent f076259 commit d4f7f54
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ - (void)testGroupByWithNil

// test the group keys
NSArray* keys = [groupedByFirstLetter allKeys];
STAssertEqualObjects([NSNull null], keys[0], nil);
STAssertEqualObjects(@"B", keys[1], nil);
STAssertEqualObjects([NSNull null], keys[1], nil);
STAssertEqualObjects(@"B", keys[0], nil);

// test that the correct items are in each group
NSArray* groupOne = groupedByFirstLetter[[NSNull null]];
Expand Down Expand Up @@ -438,8 +438,8 @@ - (void)testToDictionaryWithValueSelectorWithNil

// test the group keys
NSArray* keys = [dictionary allKeys];
STAssertEqualObjects([NSNull null], keys[0], nil);
STAssertEqualObjects(@"B", keys[1], nil);
STAssertEqualObjects([NSNull null], keys[1], nil);
STAssertEqualObjects(@"B", keys[0], nil);

// test the values
STAssertEqualObjects(dictionary[[NSNull null]], @"jim", nil);
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ NSArray* sortedInput = [input linq_sort]; // 21, 25, 34
NSArray* sortedInput = [input linq_sortDescending]; // 34, 25, 21
```

### <a name="sum"></a>linq_sum

```objc
- (NSNumber *)linq_sum;
```

Sums the elements in the array.

### <a name="ofType"></a>linq_ofType

```objc
Expand Down

0 comments on commit d4f7f54

Please sign in to comment.