                      (last evals))))
 
                (:and form)
-               (fn->multi [req]
+               (fn [req]
                  (let [rules (:and form)
                        evals (map (fn [x] (x req)) rules)
                        rejects (filter (complement success?) evals)]

  "Access Rules system for ring based applications."
  (:require [buddy.auth :refer [throw-unauthorized]]
            [buddy.auth.http :as http]
            [buddy.auth.fnutils :refer [fn->multi]]
            [clojure.walk :refer [postwalk]]
            [clout.core :as clout]))


        handler (compile-rule-handler (:handler accessrule))
        matcher (cond
                  (:pattern accessrule)
                  (fn [request]
                    (let [pattern (:pattern accessrule)
                          uri (:uri request)]
                      (when (and (matches-request-method request request-method)
