3 ms·
Thank ye! Here's another example you might want to include, if you're going for the whole Haskell angle. Not as elegant, but illustrates the concept: var fi
by seliopou 15y ago
Thank ye!
Here's another example you might want to include, if you're going for the whole Haskell angle. Not as elegant, but illustrates the concept:
var fibs = new Stream(1, function() {
return new Stream(1, function() {
return fibs.zip(function(a, b) { return a + b; }, fibs.tail());
});
});
fibs.take(10).print();
- dionyziz 15y agoGreat example, I've added it. Thank you! :)