meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
nlessa 2021-01-26T17:11:06.003Z

Hi! I have a map with a key that is a 6 elements vector. The difference between the keys is that they must differ in the first two elements of the vector. I tried this to match :

{[?eid1 ?eid2 ?eid3 ?eid4 ?eid5 ?eid6] ?val1,
 [(me/not ?eid1) (me/not ?eid2) ?eid3 ?eid4 ?eid5 ?eid6] ?val2}
but getting a map patterns may not contain variables in their keys that would make it so there is more than one match possible. How could I expresse this?

noprompt 2021-01-26T17:22:38.004900Z

@nlessa The error happens when you use match so you’ll want to switch to find. match doesn’t allow for ambiguity and a map with a variable key is ambiguous thus the message.

💯 1
noprompt 2021-01-26T17:23:06.005600Z

If you want an error, add the clause

_ (throw (ex-info "..." {,,,})
below the one you have above.

🤘 1
nlessa 2021-01-26T17:40:40.006Z

Thanks, Joel @noprompt!

👍 1