ruby list building | Sololearn: Learn to code for FREE!


ruby list building

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

12/17/2018 10:39:17 PM


2 Answers

New Answer


Checking this again could help you


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...