1
0
forked from Mirror/wren

Allow [0..-1] and [0...0] to work on empty lists.

This commit is contained in:
Bob Nystrom
2014-02-14 20:10:41 -08:00
parent ca7ff222fe
commit ea3cfa05bd
3 changed files with 18 additions and 8 deletions

View File

@ -10,10 +10,7 @@ class List {
}
+ that {
var result = []
for (element in this) {
result.add(element)
}
var result = this[0..-1]
for (element in that) {
result.add(element)
}