+ 1

ruby list building

Just wondering about x..y vs x...y What is the intuition, how do I avoid confusion?

17th Dec 2018, 10:39 PM
ChSp
ChSp - avatar
2 Réponses
+ 2
Checking this again could help you https://www.sololearn.com/learn/Ruby/2717/
20th Dec 2018, 10:58 AM
Seniru
Seniru - avatar
+ 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...
20th Dec 2018, 3:25 PM
ChSp
ChSp - avatar