Kotlin: Can "range" be used for decimal numbers? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Kotlin: Can "range" be used for decimal numbers?

Kotlin: Can "range" be used for decimal numbers?

27th Aug 2019, 7:25 PM
Tomas
Tomas - avatar
2 Answers
+ 5
Your usage is limited to within or not, but yes. https://code.sololearn.com/c9kbU8ZsD01j
8th Sep 2019, 12:18 AM
John Wells
John Wells - avatar
+ 4
This got me thinking it should be possible to implement an iterator. Therefore, I proved it. This doesn't implement everything you might want. https://code.sololearn.com/cM0Q62d3c61n
9th Sep 2019, 1:46 AM
John Wells
John Wells - avatar