1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

doc: update for release v2.3.5

This commit is contained in:
dudaodong
2025-03-07 14:19:07 +08:00
parent 8120c4db78
commit 6dfdadd34e
18 changed files with 147 additions and 128 deletions

View File

@@ -221,7 +221,7 @@ func EqualWith[T, U any](slice1 []T, slice2 []U, comparator func(T, U) bool) boo
}
// EqualUnordered checks if two slices are equal: the same length and all elements' value are equal (unordered).
// Play: todo
// Play: https://go.dev/play/p/n8fSc2w8ZgX
func EqualUnordered[T comparable](slice1, slice2 []T) bool {
if len(slice1) != len(slice2) {
return false
@@ -1003,7 +1003,7 @@ func Reverse[T any](slice []T) {
}
// ReverseCopy return a new slice of element order is reversed to the given slice.
// Play: todo
// Play: https://go.dev/play/p/c9arEaP7Cg-
func ReverseCopy[T any](slice []T) []T {
result := make([]T, len(slice))
@@ -1027,7 +1027,7 @@ func Shuffle[T any](slice []T) []T {
}
// ShuffleCopy return a new slice with elements shuffled.
// Play: todo
// Play: https://go.dev/play/p/vqDa-Gs1vT0
func ShuffleCopy[T any](slice []T) []T {
result := make([]T, len(slice))
copy(result, slice)