-
Notifications
You must be signed in to change notification settings - Fork 242
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
Feature request: Allow "anything" as a type in [pack] #891
Comments
use zexy's |
Other similar externals are cyclone/pak and else/pack2, but they're more useful if you want all inputs to be hot. But anyway, seems like an 'anything/a' in pack wouldn't be bad, and I wonder if they could also take lists, so you can join and merge two or more lists as well! |
why not also just allow swap to take symbols as well? |
the problem with this is that you can't have a proper counterpart with unpack... |
Not every time an unpack counterpart is needed. |
ClaudiusMaximus mentioned |
honestly I don't understand why [swap] exists since its functionality can be built with more basic objects: |
even though I like the idea of being able to join lists, I wouldn't know how to unjoin them with unpack, so this functionality could be better implemented into a new function in [list], actually I think there was a PR about it. |
nope, there wasn't, there's a PR for [list join] and [list unjoin] but they do different things. Well, maybe we could open a new feature request or PR for that, but it'd be separate from this one. And btw, cyclone/join and cyclone/unjoin & else/merge and else/unmerge do that. Now, there are two suggestions here:
I could implement both suggestions into separate PRs, but not this month. |
whatever you do, make sure that the implementation
|
I deleted one of the messages above, anyway, as far as implementing a more flexible [swap], [list prepend] can do it. So we don't need to add this functionality to [pack] so you can do that. Using "$2 $1" in messages also swaps things as mentioned. It still feels to me that adding 'anything' to [pack] looks useful though |
keep in mind that
|
This would allow for polymorphic/generic code and one could for example make an abstraction which could do what
[swap]
does but with symbols and floats mixed.The text was updated successfully, but these errors were encountered: