Skip to content
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

Matching sets and/or maps is difficult because of ordering #11

Open
gleenn opened this issue May 25, 2022 · 1 comment
Open

Matching sets and/or maps is difficult because of ordering #11

gleenn opened this issue May 25, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@gleenn
Copy link

gleenn commented May 25, 2022

If I have a map with {:a 1 :b 2} or equivalently {:b 2 :a 1} I don't think it's possible to write a single grape expression that matches both of those, even though it's probably relatively common. Is there a way to make a matcher that does order-independent matching, or at least have or-expressions so I could match both cases? The former would definitely be preferable, perhaps a special case for sets and maps?

This is an awesome utility, so thanks for your effort!

@bfontaine bfontaine added the enhancement New feature or request label May 27, 2022
@bfontaine
Copy link
Owner

Hello, you’re right in thinking it’s not possible right now, and I definitely agree this would be very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants