4 ms·
It'd be great if the websites for JavaScript libraries like this one would actually include the library in the page, so that while I'm reading about it, I can o
by seliopou 15y ago
It'd be great if the websites for JavaScript libraries like this one would actually include the library in the page, so that while I'm reading about it, I can open up the JavaScript debugging console and actually try out the library as I'm reading about it.
- dionyziz 15y agoThanks, 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! :)
- deleted 15y ago[deleted]