iteration: add example for Repeat function
This commit is contained in:
		@ -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")
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user