From 2684521bdd8765ab88d4cb2f1f208123e3f508c2 Mon Sep 17 00:00:00 2001 From: vinchent Date: Tue, 10 Sep 2024 13:30:09 +0200 Subject: [PATCH] iteration: add example for Repeat function --- iteration/iter_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/iteration/iter_test.go b/iteration/iter_test.go index 47e82cb..6d26fcb 100644 --- a/iteration/iter_test.go +++ b/iteration/iter_test.go @@ -1,6 +1,15 @@ package iteration -import "testing" +import ( + "fmt" + "testing" +) + +func ExampleRepeat() { + repeated := Repeat("ab") + fmt.Println(repeated) + // Output: ababababab +} func TestRepeat(t *testing.T) { repeated := Repeat("a")