@@ -21,7 +21,7 @@ go install github.com/logic-building/functional-go/gofp
2121```
2222[[constraint]]
2323name = "github.com/logic-building/functional-go"
24- version = "8.13.0 "
24+ version = "8.13.1 "
2525```
2626
2727### Quick Start
@@ -280,7 +280,13 @@ Options on go:generate :
28028026. Neg<Type>P : Returns true if num is less than zero, else false
28128127. Odd<Type>P : Returns true if n is odd
28228228. PMap<Type> : Similar to Map<Type> with additional feature - function(1st) argument runs concurrently for each item in the list(2nd argument)
283+ EX. PMapInt(squareInt, []int{v1, v2, v3})
284+ PMapInt(squareInt, []int{v1, v2, v3}, Optional{FixedPool: 2, RandomOrder: true})
285+
28328629. PMap<InputType><OutputType>: Similar to Map<InputType><OutputType> with additional feature - function(1st) argument runs concurrently for each item in the list(2nd argument)
287+ EX. PMapIntInt64(plusOneIntInt64, []int{1, 2, 3}) // input: list(int), returns: list(int64)
288+ PMapIntInt64(plusOneIntInt64, []int{1, 2, 3}, Optional{FixedPool: 2, RandomOrder: true})
289+
28429030. Pos<Type>P : Returns true if num is greater than zero, else false
28529131. Range<Type> : Returns a new list of range between lower and upper value. Optional argument(3rd) will increment value by given number
28629232. Reduce<Type> : Reduces a list to a single value by combining elements via a supplied function
@@ -302,6 +308,11 @@ Options on go:generate :
302308
303309### Functions in generated code for struct (user defined type)
304310```
311+ Note:
312+ Comparison logic for struct is based on == operator as long as the members of struct are of simple types.
313+ But reflect.DeepEqual is used for struct comparison if the struct contains any slices, maps.
314+ ```
315+ ```
3053161. Difference : Returns a set that is the first set without elements of the remaining sets
3063172. Difference<struct>By<Field>
3073183. Distinct : Returns a new list with duplicates removed
@@ -959,10 +970,14 @@ distinct := fp.DistinctInt(list) // returns [8, 2, 0]
959970### Test Coverage
960971```
961972Tests Passed : 1217
962- ok functional-go/fp 0.015s coverage: 100.0 % of statements
973+ ok functional-go/fp 0.015s coverage: 99.7 % of statements
963974ok functional-go/set 0.031s coverage: 100.0% of statements
964975```
965-
976+ ### Test Counts
977+ ```
978+ go test ./... -v | grep -c RUN
979+ 4762
980+ ```
966981### BenchMark test:
967982```
968983 Model Identifier: MacBookPro11,5
@@ -987,3 +1002,15 @@ BenchmarkMapStr-8 1000000 49438 ns/op
9871002PASS
9881003ok functional-go/fp 67.567s
9891004```
1005+
1006+ ### Benchmark test for PMap with fixed order and random order
1007+ ```
1008+ go test -benchtime=200x -bench=BenchmarkPMapInt
1009+ goos: darwin
1010+ goarch: amd64
1011+ pkg: github.com/logic-building/functional-go/fp
1012+ BenchmarkPMapInt-8 200 16224 ns/op
1013+ BenchmarkPMapIntRandomOrder-8 200 10091 ns/op
1014+ PASS
1015+ ok github.com/logic-building/functional-go/fp 4.549s
1016+ ```
0 commit comments