titer_no_tuple_unpack.nim 214 B

1234567891011121314
  1. iterator xrange(fromm, to: int, step = 1): tuple[x, y: int] =
  2. var a = fromm
  3. while a <= to:
  4. yield (a, a+1)
  5. inc(a, step)
  6. for a, b in xrange(3, 7):
  7. echo a, " ", b
  8. for tup in xrange(3, 7):
  9. echo tup