|
|
|
|
|
by brudgers
2751 days ago
|
|
I am lately enamored of Ruby because it helps me write code that makes me happy. Calling methods on numbers is one of those things that does. Anyway, ranges are another way of expressing the concepts in Ruby: (5.0.next_float..10.0.prev_float).include?(x)
or (5.0.next_float...10).include?(x)
if I don't mean (5..10).include?(x)
None of which is advice. Just remarks about why I am enamored of Ruby, lately. If I wanted to write C, I'd use Go. |
|