Added Sequence.list

This helper method turns any sequence into a List.
This commit is contained in:
Thorbjørn Lindeijer
2015-03-27 22:59:58 +01:00
parent 7d45dda383
commit b409569b6f
4 changed files with 34 additions and 0 deletions
+8
View File
@@ -136,6 +136,14 @@ static const char* libSource =
"\n"
" return result\n"
" }\n"
"\n"
" list {\n"
" var result = new List\n"
" for (element in this) {\n"
" result.add(element)\n"
" }\n"
" return result\n"
" }\n"
"}\n"
"\n"
"class String is Sequence {}\n"