iterator count[T: SomeInteger](x, y: T): T =
      if x < y:
        for n in countup(x, y): yield n
      else:
        for n in countdown(x, y): yield n
    
    
    Run

This is what I used. This retains the direction.

Reply via email to