std.range.iota enhancement: supporting more types (AKA issue 10762)

Jakob Ovrum jakobovrum at gmail.com
Sat Dec 28 00:06:39 PST 2013


On Tuesday, 24 December 2013 at 12:02:54 UTC, Francesco Cattoglio 
wrote:
> iota(DateTime(2012, 1, 1), DateTime(2013, 1, 1), dur!"days"(5));
> can you easily tell what is the "back" element?

If it can't be defined reasonably for a custom step[1], then 
simply don't support it when a custom step is provided. There's 
absolutely no reason for this to compromise the functionality of 
the common case.

[1] Which I'm not convinced of; e.g. `back` == `DateTime(2013, 1, 
1) - dur!"days"(5)`.


More information about the Digitalmars-d mailing list