:map :key-order request:
riotrah opened this issue · 2 comments
Hey again,
I love to be able to sort maps. However, sometimes I want the inverse of :map {:key-order ...}
- I want to specify which keys come last.
I propose two options:
- another option like
:key-order-inverse
or something - a slightly modified api altogether:
3. support more flexible ordering a la storybook's approach here (or at least a certain subset of it)
4. like so:[:first :second "*" :penultimate :last]
5. Where"*"
is some special token or symbol of your choosing, string or otherwise
6. this way, depending on your special token of choice, we can maintain compatibility, and still keep one:key-order
config option
What do you think?
This seems like a reasonable request, and I like your idea of an extended API that maintains compatibility a lot. Thanks for bringing that up! I'm currently pressing to get the latest release finished up and out, but I will definitely add this to the list for the next release. I seems like a good idea!
Implemented this in the just released 1.2.6
. Instead of your good suggestion of "*"
as a token to separate beginning from ending keys, I decided to use :|
instead. I hope this feature works out for you.
Thanks for asking for this feature. It has not been clear to me how many people use zprint at the REPL. It is nice to know somebody does!