Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CartesianProduct ¶
CartesianProduct iterates over every combination of n items from the elts list. It will allocate "1 + len(elts) to the power of n" slices.
Internally it's using an array of indexes to iterate over every possible combination of positions in the elts list. It's using basic math to pass to the next possiblity by adding 1 to the lowest weight index and propagating the carry to a higher index, until all solutions have been interated over.
func Must ¶
Must takes any type of result and error. It panics if the error is non-nil. Otherwise, it returns the result.
func MustAtoInt ¶
func MustAtoInt[T constraints.Integer](s string) T
MustAtoi converts a string to an integer. It panics if it fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.