Skip to content

Commit

Permalink
Pairwise, but better
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbot committed Nov 29, 2024
1 parent e816dbb commit 2569216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion combinatorics.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func Combinations[T any](vals []T) iter.Seq[[]T] {
return CombinationsOfLength(vals, len(vals))
}

// Pairwise will yield all possible combinations of the two slices
// Pairwise will yield all possible combinations of the two iterators
func Pairwise[T, V any](s1 iter.Seq[T], s2 iter.Seq[V]) iter.Seq2[T, V] {
i1, i2 := Tee(s1)

Expand Down

0 comments on commit 2569216

Please sign in to comment.