Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 844 Bytes

readme.md

File metadata and controls

19 lines (11 loc) · 844 Bytes

kcomb

Go

Compute (and stream/generate) every possible combination within N sets of data using an implementation of n choose k.

This could be useful when doing something like generating every possible template string given a set of values for each variable in the template. This works even when the number of variables per template is unknown.

When working with larger sets, this can be resource intensive as results could be in the millions+. The CombineGenerator func will allow you to create a pipeline and efficently iterate without eating much CPU or memory.

See tests and the demo for usage and benchmarking.

go get -u github.com/psaia/kcomb

data stream