Tree
- Tree:
10bae7f9dbb58c8e43a04569fb8c91622db9b1f4- Date:
- Message:
- Update for 1.18
| .gitignore | commits | blame |
| LICENSE | commits | blame |
| README.md | commits | blame |
| go.mod | commits | blame |
| permutation.go | commits | blame |
| permutation_test.go | commits | blame |
README.md
# permutation
A simple permutation package using generics. Requires go1.18 or higher
## Install
```bash
go get git.fputs.com/fputs/permutation
```
## Usage
```go
package main
import (
"fmt"
perm "git.fputs.com/fputs/permutation"
)
func main() {
a := []int{1, 2, 3, 4}
p := perm.Permutations(a)
fmt.Println(p)
}
```
result:
```
[1 2 3]
[2 1 3]
[3 1 2]
[1 3 2]
[2 3 1]
[3 2 1]
```
