;; lib/mod/defrule.sx — ergonomic rule / ruleset construction.
;;
;; The roadmap sketched a (defrule action :when conditions) surface. Conditions
;; already evaluate to plain data, so this needs no macro — variadic functions
;; suffice: mod/defrule collects its trailing condition forms via &rest (dropping
;; the explicit outer (list ...)), and mod/ruleset assembles rules the same way.
;;
;;   (mod/ruleset
;;     (mod/defrule "spam-hide" :hide (list :classification "spam"))
;;     (mod/defrule "default-keep" :keep))

(define
  mod/defrule
  (fn (name action &rest conds) (mod/mk-rule name action conds)))

(define mod/ruleset (fn (&rest rules) rules))
