I'm very new to {{core.match}} and just started playing around. Doing so, I came up with this example:
(for [x [[1 2 3]
[1 2 3 4]
{:a 17, :b 2}
{:a 23, :b 7}]]
(match [x]
[[a b c]] [a b c]
[{:a a, :b 2}] {:a a}
[{:a (a :guard odd?), :b b}] {:a a, :b b}
:else :no-match))
This errors with the message ??"IllegalArgumentException Argument must be an integer: :clojure.core.match/not-found clojure.core/even? core.clj:1351)"??. The problem is that the keyword {{:clojure.core.match/not-found}} is passed to the {{:guard}} function {{odd?}} which passes it to {{even?}}.
I can fix it by ensuring the my guard only gets an integer like so:
(for [x [[1 2]
[1 2 3]
[1 2 3 4]
{:a 17, :b 2}
{:a 23, :b 7}]]
(match [x]
[[a b c]] [a b c]
[{:a a, :b 2}] {:a a}
[{:a (a :guard #(and (integer? %)
(odd? %))), :b b}] {:a a, :b b}
:else :no-match))
But is it really intensional that guards have to deal with {{:clojure.core.match/not-found?}} In my opinion, in the example above all maps that are matched have integer values, so it seems plausible that I can have a guard that only accepts integers.