Use for loop in List.toString.
This commit is contained in:
+1
-3
@@ -58,9 +58,7 @@ const char* coreLibSource =
|
||||
"class List {\n"
|
||||
" toString {\n"
|
||||
" var result = \"[\"\n"
|
||||
" var i = 0\n"
|
||||
" // TODO: Use for loop.\n"
|
||||
" while (i < this.count) {\n"
|
||||
" for (i in 0...this.count) {\n"
|
||||
" if (i > 0) result = result + \", \"\n"
|
||||
" result = result + this[i].toString\n"
|
||||
" i = i + 1\n"
|
||||
|
||||
Reference in New Issue
Block a user