non/spire — pull request #320 by non (2014-11-11 06:22:12+00:00)
Title: Add an iterator method to Interval[A].

This method allows users to easily iterate over an exact range:

val ns = Interval(0L, Long.MaxValue)

val longs1 = ns.iterator(2L).take(30).toList
val longs2 = ns.iterator(Long.MaxValue / 3).toList

There is some safe-guarding to avoid overflow in the case of
fixed-width integer types (Int, Long, etc.). However, there is
no attempt to compensate for arithmetic error during addition.
Using Interval[Rational] in these cases is probably better.