updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+4 -6
View File
@@ -1,18 +1,16 @@
package langext
import "slices"
import "sort"
func Sort[T OrderedConstraint](arr []T) {
sort.Slice(arr, func(i1, i2 int) bool {
return arr[i1] < arr[i2]
})
slices.Sort(arr)
}
func AsSorted[T OrderedConstraint](arr []T) []T {
arr = ArrCopy(arr)
sort.Slice(arr, func(i1, i2 int) bool {
return arr[i1] < arr[i2]
})
slices.Sort(arr)
return arr
}