From dcc2b9d268c65ccf52602cc6eca5f60eadb5768a Mon Sep 17 00:00:00 2001 From: gram Date: Wed, 6 Sep 2023 10:16:20 +0200 Subject: [PATCH] drop examples from doc comments --- slices/slice.go | 6 ------ slices/slices.go | 2 -- 2 files changed, 8 deletions(-) diff --git a/slices/slice.go b/slices/slice.go index c3d0cf0..324d86c 100644 --- a/slices/slice.go +++ b/slices/slice.go @@ -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() { @@ -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() { @@ -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 diff --git a/slices/slices.go b/slices/slices.go index 1387486..be7a376 100644 --- a/slices/slices.go +++ b/slices/slices.go @@ -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)