iota with custom boundary conditions

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Tue Nov 13 07:11:36 PST 2012


On 11/13/2012 03:43 PM, monarch_dodra wrote:
> The only time I could possibly see a use for open-close in iota, is when you
> want to iterate all the way to T.max.
>
> But I don't think that use-case justifies the change.

Suppose I want to calculate function values across a continuous interval. 
Obviously an elegant way of doing this is to foreach across the range of an iota 
that covers the interval with small increment.

However, the function may be asymptotic at either the upper or lower boundary, 
or both, or none.  So I need to be able to indicate correspondingly whether the 
upper or lower bounds of the iota should be included or not.

It's maybe not the most important use-case, but if the change can be introduced 
in a non-breaking way, why not?


More information about the Digitalmars-d mailing list