3 ms·
Thanks, that's a great idea! I made it load up the library and added a note in the tutorial that one can use their browser JS console to fiddle with it :)
by dionyziz 15y ago
Thanks, that's a great idea! I made it load up the library and added a note in the tutorial that one can use their browser JS console to fiddle with it :)
- seliopou 15y agoThank 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! :)
- exogen 15y agoIt might be convenient to implement s.print(n) as shorthand for s.take(n).print(). :)
- dionyziz 15y agoexogen — great idea. I've just added that feature. Thank you! :)