6 ms·
tl;dr; = It's an array with a few utility methods, but can also hold 'infinite' things like "all the positive even numbers". Not terribly useful imho and certa
by mibbit 15y ago
tl;dr; = It's an array with a few utility methods, but can also hold 'infinite' things like "all the positive even numbers".
Not terribly useful imho and certainly doesn't live up to the hyped intro.
- omaranto 15y agoStreams and other lazy infinite data structures can be very convenient, but this isn't really obvious at first glance. I recommend you check out some of the FP literature. A good place to start reading about the virtues of streams and lazy evaluation is "Why functional programming matters" (available at http://www.cs.utexas.edu/~shmat/courses/cs345/whyfp.pdf http://www.cs.utexas.edu/~shmat/courses/cs345/whyfp.pdf).
- threecreepio 15y agoIt's a good concept and all, the issue i've had with it for my own use is that the native Array functions are so fast in JavaScript (and function invocation so comparatively slow) that you really need a very specific use case for them to be worthwhile over simply performing your operations on the array directly like Underscore.js.