From 27142bf633465f6b8308fd6114c737e98eec2629 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Wed, 22 Feb 2017 16:04:52 -0500 Subject: [PATCH] s/shuffle/rotate/g --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index c9ec05c..43197b4 100644 --- a/main.go +++ b/main.go @@ -36,11 +36,11 @@ func main() { strings := make(chan string) go genAllStrings(*numLetters, strings) - shuffled := make(chan string) - go shuffle(strings, shuffled) + rotated := make(chan string) + go rotate(strings, rotated) puzzles := make(chan puzzle) - go matchWords(shuffled, puzzles) + go matchWords(rotated, puzzles) writePuzzles(puzzles) } @@ -65,7 +65,7 @@ func genAllStrings(n int, out chan<- string) { close(out) } -// shuffle emits shuffled versions of the string. +// rotate emits rotated versions of the string. // // If s is "abcdefg", out will be sent: // - abcdefg @@ -75,7 +75,7 @@ func genAllStrings(n int, out chan<- string) { // - efgabcd // - fgabcde // - gabcdef -func shuffle(in <-chan string, out chan<- string) { +func rotate(in <-chan string, out chan<- string) { for s := range in { for i := 0; i < len(s); i++ { first, rest := s[:i], s[i:]