Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,14 @@
import sequtils, strformat
proc displayRange(first, last, step: int) =
stdout.write &"({first:>2}, {last:>2}, {step:>2}): "
echo if step > 0: ($toSeq(countup(first, last, step)))[1..^1]
elif step < 0: ($toSeq(countdown(first, last, -step)))[1..^1]
else: "not allowed."
for (f, l, s) in [(-2, 2, 1), (-2, 2, 0), (-2, 2, -1),
(-2, 2, 10), (2, -2, 1), (2, 2, 1),
(2, 2, -1), (2, 2, 0), (0, 0, 0)]:
displayRange(f, l, s)