Skip to content

Commit

Permalink
drop examples from doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Sep 6, 2023
1 parent 1128384 commit dcc2b9d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions slices/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ func Min[S ~[]T, T constraints.Ordered](items S) (T, error) {
}

// Permutations returns successive size-length permutations of elements from the slice.
//
// {1 2 3} -> {1 2} {1 3} {2 1} {2 3} {3 1} {3 2}
func Permutations[T any](items []T, size int) chan []T {
c := make(chan []T, 1)
go func() {
Expand Down Expand Up @@ -378,8 +376,6 @@ func permutations[T any](items []T, c chan []T, size int, left []T, right []T) {
}

// Product returns cortesian product of elements
//
// {1 2 3} -> {1 1} {1 2} {1 3} {2 1} {2 2} {2 3} {3 1} {3 2} {3 3}
func Product[S ~[]T, T any](items S, repeat int) chan []T {
c := make(chan []T, 1)
go func() {
Expand Down Expand Up @@ -637,8 +633,6 @@ func Unique[S ~[]T, T comparable](items S) bool {
}

// Window makes sliding window for the given slice
//
// ({1,2,3}, 2) -> (1,2), (2,3)
func Window[S ~[]T, T any](items S, size int) ([]S, error) {
if size <= 0 {
return nil, ErrNonPositiveValue
Expand Down
2 changes: 0 additions & 2 deletions slices/slices.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ func Intersect2[S1 ~[]T, S2 ~[]T, T comparable](items1 S1, items2 S2) []T {
}

// Product returns cortesian product of elements in the given slices.
//
// {1 2} {3 4} -> {1 3} {1 4} {2 3} {2 4}
func Product2[T any](items ...[]T) chan []T {
c := make(chan []T, 1)
go product2(items, c, []T{}, 0)
Expand Down

0 comments on commit dcc2b9d

Please sign in to comment.