meander 2021-08-30

Is there any way to catch exception inside lhs?

idiotic example

(m/rewrite "foo"
  (try (m/pred neg? ?x)) ?x)

can be done this way, but maybe it can be done simpler?

(m/match "foo"
  (m/and ?x (m/guard (catching (zero? ?x)))) ?x
  _ false)

@huxley are you asking if m/pred can use try/`catch`?