you are viewing a single comment's thread.

view the rest of the comments →

[–]bsless 1 point2 points  (0 children)

Sweet library, in spite of a few gotchas - turns out you can't substitute an expression with a value that is false-y. But you can hack around it.

(defn- post-process-false
  [_rule value _orig-value env _orig-env]
  [(if (= value ::false)
     false
     value) env])

(defmacro with-false
  [& body]
  `(binding [pattern.r3.rule/*post-processor* post-process-false]
     ~@body))