Bob Nystrom
08618abc5d
fix: allow empty range subscripts [0..-1] and [0...0] on empty lists
...
Add special case in list_subscript native to return a new empty list when
the source list is empty and the requested range is [0..-1] (inclusive) or
[0...0] (exclusive). This enables using list[0..-1] as a universal copy
idiom that works even for empty lists. Update the List.+ operator to use
this idiom instead of manual iteration. Add test cases for both range
forms on empty lists.
2014-02-15 04:10:41 +00:00
..
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2013-12-20 20:42:11 +00:00
2013-12-20 20:42:11 +00:00
2014-02-10 15:55:14 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-05 20:27:12 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-02-15 01:24:06 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-02 15:32:00 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-02-15 01:24:06 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-05 20:27:12 +00:00
2014-01-03 18:47:26 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-01-30 17:12:44 +00:00
2014-02-15 04:10:41 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-02-13 16:38:44 +00:00
2014-01-03 18:47:26 +00:00
2014-01-03 18:47:26 +00:00
2014-01-30 17:12:44 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00
2014-01-05 20:27:12 +00:00