Menu ▾ ▴

#8 Range operator in expressions

open
nobody
None
5
2003-06-05
2003-06-05
No

It would be useful (for index ranges in tuples or
matrices) to have a range operator that expands to a
list (tuple) of integer values, e.g. like in Perl:

2..4 -> 2 3 4 and reverse 1..-2 --> 1 0 -1 -2

or like in Matlab, with step:

2 : 4 1 : -1 : -2 or non-integer 6.5 : 0.5 : 8.1
--> 6.5 7 7.5 8

Discussion


Log in to post a comment.