From 2fb5ea542d374b84bced5368c4636d8bb05a205b Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Sun, 21 Aug 2022 14:08:25 +0200 Subject: [PATCH] fixed reverse implementation --- reverse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse.go b/reverse.go index e9e0d3c..a4f0b29 100644 --- a/reverse.go +++ b/reverse.go @@ -4,7 +4,7 @@ func Reverse[T any](slice []T) []T { s := make([]T, len(slice)) for i := 0; i < len(slice); i++ { ri := len(slice) - 1 - i - s[ri] = s[i] + s[ri] = slice[i] } return s }