The worse bug I fought in one of my rust programs was when using the range type. I needed to go from n to 1 included, so, from n included to 0 excluded. Of course `(n..0)` didn't work, so I tried `(0..n).rev()`, which didn't work either (first, you generate all numbers in [0;n-1], then you reverse the list), and I can't blame the language, it makes sense, but it's highly unintuitive (in python for instance, `range(n, 0, -1)` does what is expected).
I'm not a seasoned rust programmer though, is there a better, more explicit way to do what I attempted there?
I'm not a seasoned rust programmer though, is there a better, more explicit way to do what I attempted there?