4 ms·
I think (1..=n).rev() will do what you want? A .step_by() that accepts negative values a la python would be nice, but I can live without. I'd love a REPL for
by yodelshady 6y ago
I think (1..=n).rev() will do what you want?
A .step_by() that accepts negative values a la python would be nice, but I can live without.
I'd love a REPL for this sort of thing though - a website just isn't as good.
- sacado2 6y agoThank you! I didn't know about the `=n` syntax.