You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-6Lines changed: 49 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,19 @@
2
2
3
3
Inspired from [Lodash](https://github.com/lodash/lodash) for golang
4
4
5
-
#Functions
5
+
## Why?
6
6
7
-
## Map
7
+
I did not like most map/reduce implementations that returned an `interface{}` which had to be typecasted. This library follows the concept of how `json.Marshal` works. Create an output variable **outside** the functions and pass a **pointer reference** to it, so it can be **set**.
8
+
This library heavily makes use of `reflect` package and hence will have an **impact on performance**. Use it with care. All functions have **validations** on how mapper function/predicate functions should be written. So even if we lose out on compile time validation, the library still **does not panic** if it does not know how to handle an argument passed to it.
9
+
10
+
## Available Functions
11
+
12
+
1.[Map](#Map)
13
+
2.[Filter](#Filter)
14
+
15
+
## Usages
16
+
17
+
### Map
8
18
9
19
Map applies a mapper function on each element of an input and sets it in output.
0 commit comments