adding Stream.iterate() constructor

This commit is contained in:
Bence Eros
2015-06-14 01:17:49 +02:00
parent c5432f4533
commit a8871c9dfa
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -12,6 +12,8 @@ Stream.generate(function() {
});
Stream.generate(() => 1);
numStream = Stream.iterate(1, (n) => n * 2);
var comparator = (s1, s2) => 0;
numStream = numStream.filter(n => n % 2 == 0);