File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ func main() {
9393
9494### Reduce
9595
96- Reduce can accept a reducer and apply the reducer on each element of the input slice while providing an accumulator to save the reduce output
96+ Reduce can accept a reducer and apply the reducer on each element of the input slice while providing an accumulator to save the reduce output.
9797For more [ docs] ( https://godoc.org/github.com/thecasualcoder/godash#Reduce ) .
9898
9999``` go
Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ import (
99// Currently, input and output for type slice is supported.
1010//
1111// Validations:
12- // 1. Mapper function should take in one argument and return one argument
13- // 2. Mapper function's argument should be of the same type of each element of input slice.
14- // 3. Mapper function's output should be of the same type of each element of output slice.
12+ //
13+ // 1. Mapper function should take in one argument and return one argument
14+ // 2. Mapper function's argument should be of the same type of each element of input slice.
15+ // 3. Mapper function's output should be of the same type of each element of output slice.
1516//
1617// Validation failures are returned as error by the godash.Map to the caller.
1718func Map (in , out , mapperFn interface {}) error {
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ import (
1818// Reduce does the following validations:
1919//
2020// 1. Reducer function should accept exactly 2 arguments and return 1 argument
21- // 2. Reducer function's second argument should be the same type as input slice's element type
22- // 3. Reducer function's return type should be the same as that of the accumulator
21+ // 2. Reducer function's second argument should be the same type as input slice's element type
22+ // 3. Reducer function's return type should be the same as that of the accumulator
2323//
2424// Validation errors are returned to the caller.
2525func Reduce (in , out , reduceFn interface {}) error {
You can’t perform that action at this time.
0 commit comments