Add count to Sequence.

This commit is contained in:
Bob Nystrom
2015-03-06 07:01:02 -08:00
parent d722adddff
commit d35e3c917c
3 changed files with 27 additions and 0 deletions
+8
View File
@@ -45,6 +45,14 @@
// This string literal is generated automatically from core. Do not edit.
static const char* libSource =
"class Sequence {\n"
" count {\n"
" var result = 0\n"
" for (element in this) {\n"
" result = result + 1\n"
" }\n"
" return result\n"
" }\n"
"\n"
" map(f) {\n"
" var result = new List\n"
" for (element in this) {\n"