clara 2020-09-30

@futuro it's possible for it to match multiple rules, but there is a preference as to which one we want to use. Right now I'm assigning a priority to the matches and then using an accumulator to select the best. Is this a valid approach?

👍🏽 1

Yes. Priority sort of logic comes up often in my past usages

This this was a related gist I did about it long ago. Not sure if it’s exactly the same situation though.

@mikerod that's very useful. It does look like you're using clojure maps over records?

@petr just for the sake of example. Either would work for the concept

Of course. I think I would prefer to use maps over records in my code-base. I was excited to see an example. I didn’t know it was possible

You probably want two rules, one for when there’s a match and one for when there isn’t (using the :not predicate)