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

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -