mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
update: make func comment consistent
This commit is contained in:
1 parent
3dadfa234b
commit
907df56f86
2 files changed
+3
-28
No files matched your search
+1
-1
@@ -156,7 +156,7 @@ func Count[T any](slice []T, fn func(index int, t T) bool) int {
|
||||
}
|
||||
|
||||
// GroupBy iterate over elements of the slice, each element will be group by criteria, returns two slices
|
||||
// The function signature should be func(int, value T) bool .
|
||||
// The function signature should be func(index int, T) bool .
|
||||
func GroupBy[T any](slice []T, fn func(index int, t T) bool) ([]T, []T) {
|
||||
|
||||
if fn == nil {
|
||||
|
||||
Reference in new issue
Block a user