Commit Briefs

5cd051f7fb Evan Burkey

Convert README from markdown to plaintext (master)


5d0edba2b0 Evan Burkey

git repo update


65bd8c99d0 Evan Burkey

add PermutationsAllSizes


61655a2799 Evan Burkey

github migration


831f490cfe GitHub

Update README.md


3b4b6c322e GitHub

Update for 1.18


2ccc3f8af5 Evan Burkey

Add documentation


3889536a56 Evan Burkey

init


Branches

Tags

This repository contains no tags

Tree

.gitignorecommits | blame
LICENSEcommits | blame
READMEcommits | blame
go.modcommits | blame
go.sumcommits | blame
permutation.gocommits | blame
permutation_test.gocommits | blame

README

permutation
A simple permutation package using generics. Requires go1.18 or higher

-- Install --
go get github.com/fputs/permutation@latest

-- Usage --

package main

import (
	"fmt"

	perm "github.com/fputs/permutation"
)

func main() {
	a := []int{1, 2, 3}
	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]