-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add useful "predefined" streams #24
Comments
🎱 Signs point to "yes". It'd be nice to see what the community ends up doing with most.js, then think about what to pre-create. Hmmm.... then again, the community might need help knowing what they can do with most.js. My instinct says that examples might be a better place to show users what they can do. Does it make sense to create some helpers inside the examples? If we decide to add helpers like these to most.js, perhaps put them in ancillary files? e.g. most/range or most/numeric? |
Seems like a great idea. If several people say something like "jeez, I do that all the time, why isn't that built in???", we could consider pulling it in.
Yeah, I like that too. We can probably make the call as needed, since some things might end up being so universally useful that we'd want them in main, while others we might not. |
I think this is the way to go. Similarly, we can keep an eye out for things that seem to be "missing", ie if we consistently hear "I sure wish it was easier to do X", then we can create an issue to discuss providing convenience method X. So, I we should open more focused issues as they arise. Closing. |
The ones that come to mind immediately are numeric ranges, ie all integers from 0 to 99, or all decimal numbers from 0 to 9, stepping by 0.25. They're easy to create using
most.iterate
, but maybe slightly verbose without arrow functions:In writing that out, I also noticed how annoying it is to have to divide to do the
take
correctly :(. So, for example, maybe we could provide something likemost.range
that hides the details:There may be other useful streams, but numbers are the ones the came to mind first, and numeric ranges are generally useful in lots of situations.
Are there other predefined streams that seem like they'd be broadly useful? Should we just provide numeric ranges? Would it be better to stick with base building blocks for now? Is this the slippery slope that leads to a huge, unwieldy API?
The text was updated successfully, but these errors were encountered: