Files
2026-03-31 20:02:01 +00:00
..
2026-03-31 20:02:01 +00:00
2026-03-31 20:02:01 +00:00
2026-03-31 20:02:01 +00:00

generic combinations in golang

docs: https://pkg.go.dev/fiatjaf.com/lib/combinations

[source,go]
----
c := combinations.Combinations([]string{"a", "b", "c"}, 2)
fmt.Println(c)
// Output:
// {{"a" "b"} {"a" "c"} {"b" "c"}}
----

based on https://medium.com/codex/generating-combinations-efficiently-with-asifs-algorithm-d453e803893