Open nicewook opened 2 months ago
well i have tested in bash file and it always return the same result
sorry for confusion. I mean the parallel version. belows are my test and the result
func ExamplePartitionByParallel3() {
partitions := lop.PartitionBy([]int{-2, -1, 0, 1, 2, 3, 4, 5}, func(x int) string {
if x < 0 {
return "negative"
} else if x%2 == 0 {
return "even"
}
return "odd"
})
fmt.Println(partitions)
// Output:
// [[-2 -1], [0 2 4], [1 3 5]]
}
result
=== RUN ExamplePartitionByParallel3
--- FAIL: ExamplePartitionByParallel3 (0.00s)
got:
[[5 1 3] [2 4 0] [-2 -1]]
want:
[[-2 -1], [0 2 4], [1 3 5]]
I have tested the example of lop.PartitionBy on README.md It keep changed the order