github.com/searKing/golang/go@v1.2.117/exp/slices/reverse.go (about) 1 // Copyright 2022 The searKing Author. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package slices 6 7 import "slices" 8 9 // Reverse reorder a slice of any ordered type in reverse order. 10 // Reverse modifies the contents of the slice s; it does not create a new slice. 11 // Deprecated: Use slices.Reverse instead since go1.21. 12 func Reverse[S ~[]E, E any](s S) { 13 slices.Reverse(s) 14 }