String rotation - output string repeatedly moving first character to the end The challenge here is to take a string and output all its rotations, by repeatedly moving the first character to the end, once per character in the string, ending with the original string:

john -&gt; ohnj, hnjo, njoh, john


You may also cycle in the other direction, moving characters from the end:

john -&gt; njoh, hnjo, ohnj, john


You should still output one rotation per letter even if the original word is reached before that:

heehee -&gt; eeheeh, eheehe, heehee, eeheeh, eheehe, heehee


Character arrays are allowed, as long as the result works as shown above.

Shortest answer wins!
Haskell, 27 bytes

scanl(\(a:b)_-&gt;b++[a])=&lt;&lt;id


Try it online!