On Tuesday, 24 December 2013 at 11:47:12 UTC, Francesco Cattoglio wrote:
Correct, but there's no way to compute "back" with less than O(n) complexity, unless division by increment is available.

I would like to add that I want to compute back because the current documentation states: Returns a range that goes through the numbers begin, begin + step, begin + 2 * step, ..., up to and excluding end. Up to and excluding seems perfectly reasonable, and others have agreed that allowing the user to write iota(4, 9, 2) can be a nice idea. Another nice example:

iota(DateTime(2012, 1, 1), DateTime(2013, 1, 1), dur!"days"(5));
can you easily tell what is the "back" element?

Reply via email to