3 ms·
The 'repeat' command ("repeats the last M lines of output, starting N lines from the end") isn't very well described by the documentation, so some experimentati
by jameshart 11y ago
The 'repeat' command ("repeats the last M lines of output, starting N lines from the end") isn't very well described by the documentation, so some experimentation is required. 'repeat M N' will produce no output at all when the output is empty, but will always produce M lines of output, by repeatedly looping through the last (min(N, lines of output)) lines of the output, when the output is not. That's not very intuitive.
- wgreenberg 11y agoAgreed, the descriptions could use some work. That said, I tried to strike a balance between correctness and simplicity when describing the commands so people could quickly get to trying stuff out. I do show that particular edge case (along with "print 0") in the examples, though.