+ 1
ruby list building
Just wondering about x..y vs x...y What is the intuition, how do I avoid confusion?
2 Answers
+ 2
Checking this again could help you
https://www.sololearn.com/learn/Ruby/2717/
+ 1
Seniru Pasan , that doesn't really relate to my question. I wasn't asking about the Syntax but about the Semantics. Why is 2.. 4 equal to 2,3,4 while 2...4 is equal to 2,3? As the more commonly used I would expect the latter to be the shorter, but no. Is there some intuition behind the notation, maybe a historic reason? Google doesn't really help...