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
@@ -14,6 +14,13 @@ class Sequence {
}
return result
}
forall(f) {
for (element in this) {
if (f.call(element) != true) return false
}
return true
}
}
class List is Sequence {