Use varargs for GetPermutations

This commit is contained in:
2022-06-12 23:48:14 -05:00
parent f03184d4c4
commit 0a249b85fc
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ type Permutable interface {
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}
func GetPermutations[T Permutable](arr []T) [][]T {
func GetPermutations[T Permutable](arr ...T) [][]T {
var helper func([]T, int)
res := [][]T{}