%&:x for vararg keyword arguments %&1 for indexing into the first vararg %&1:x for looking up :x on the first vararg %*[0 :x] for looking up :x by get-in on the first arg %&*[0 :x] for looking up :x by get-in in the first vararg %1*[:x] for looking up :x by get-in on the first arg %&1*[:x] for looking up :x by get-in in the first vararg
?
Edit: well, that doesn’t do a map or filter across the args… Was there a syntax where you expected that?
Edit 2: btw, we need an extra symbol, like *, to signal that the following thing will be a vector for a get-in path. This feature will probably require rewriting things with zippers… So I may add that in a later version, unless somebody wants to take a crack at that.
Edit 3: I’ve edited the syntax above multiple times already I just realized, indices within the get-in path are different than anon-arg indices, (%1) so those need to be zeros rather than ones for indexing into the first element. In which case, I guess I’ll allow %1*[... and %&1*[... to preserve one-based indexical access for the top level. Examples above updated.
Yes, this makes sense to me. I’m not fussed about the * syntax options – I think they’re just “clever” for the sake of it, and do not make code more readable.
spec the syntax and provide useful feedback on errors
provide a predicative extension mechanism via dispacio to allow user defined transforms within existing percs, so that everyone can be free to taste the unlimited, sweet, sugary nectar of anonymous liberty!
more/better tests
more/better documentation
possible zipper implementation, allowing for transforming groups of expressions at a time
Feel free to submit PRs, issues or hit me up with any questions and happy Independence Day weekend!