scala - Create Range with inclusive end value when stepping -
is there way create range includes end value when using step doesn't align?
for instance following yields:
scala> range.inclusive(0, 35, 10) res3: scala.collection.immutable.range.inclusive = range(0, 10, 20, 30)
but end value (35) included so:
scala> range.inclusive(0, 35, 10) res3: scala.collection.immutable.range.inclusive = range(0, 10, 20, 30, 35)
no, not current definition/ implementation. strange behaviour have step same intermediate elements different last.
Comments
Post a Comment