Adds forall method on Sequences.

This commit is contained in:
Gavin Schulz
2015-01-13 23:47:01 -08:00
parent 73b041a78a
commit 7716ad6263
4 changed files with 27 additions and 0 deletions
+7
View File
@@ -57,6 +57,13 @@ static const char* libSource =
" }\n"
" return result\n"
" }\n"
"\n"
" forall(f) {\n"
" for (element in this) {\n"
" if (f.call(element) != true) return false\n"
" }\n"
" return true\n"
" }\n"
"}\n"
"\n"
"class List is Sequence {\n"