A
Alex Young
This surprised me:
C:\Documents and Settings\Alex>ruby -e "(4..1).each{|a| puts a}"
C:\Documents and Settings\Alex>ruby -e "(1..4).each{|a| puts a}"
1
2
3
4
C:\Documents and Settings\Alex>
Should it have done? I find it somewhat odd that ranges can only be
enumerated in one direction. Is there a reason for it?
C:\Documents and Settings\Alex>ruby -e "(4..1).each{|a| puts a}"
C:\Documents and Settings\Alex>ruby -e "(1..4).each{|a| puts a}"
1
2
3
4
C:\Documents and Settings\Alex>
Should it have done? I find it somewhat odd that ranges can only be
enumerated in one direction. Is there a reason for it?