Commit bfac048
authored
Updating Count function (#36)
* Adding some new funky functions which I find useful
Created a Tuple struct as some of the new functions require you to return a new slice with two fields which is the result of the new functions
Created the Join, JoinProjection, Range, SumMap, Zip functions, ecah fuction is documented with how it works and had a unit test or maybe more
* Added in an OrderBy function
* Documentation comment for OrderBy which I missed out
* Adding a Unit test for JoinProject function
Updated the comments on the Join & OrderBy functions so they make a little more sense.
Covered an extra test case with the Join test, where the left set has more data than the right and so the Right handside array of the join is empty
* Adding a count method to the package, so you can find out how many items in a slice satisfy and given condition
* Updating count to work with any so you can count structs as well as basic types
* Removing extra underscores1 parent 541e707 commit bfac048
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments