Skip to content

Commit

Permalink
acc -> r
Browse files Browse the repository at this point in the history
  • Loading branch information
ikitommi committed Sep 2, 2023
1 parent 74cf75a commit 4a44848
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/malli/impl/regex.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,19 @@
;;;; ## Alternation

(defn alt-validator [?kr & ?krs]
(reduce (fn [acc ?kr]
(reduce (fn [r ?kr]
(let [r* (entry->regex ?kr)]
(fn [driver regs pos coll k]
(park-validator! driver r* regs pos coll k) ; remember fallback
(park-validator! driver acc regs pos coll k))))
(park-validator! driver r regs pos coll k))))
(entry->regex ?kr) ?krs))

(defn alt-explainer [?kr & ?krs]
(reduce (fn [acc ?kr]
(reduce (fn [r ?kr]
(let [r* (entry->regex ?kr)]
(fn [driver regs pos coll k]
(park-explainer! driver r* regs pos coll k) ; remember fallback
(park-explainer! driver acc regs pos coll k))))
(park-explainer! driver r regs pos coll k))))
(entry->regex ?kr) ?krs))

(defn alt-parser [& rs]
Expand Down Expand Up @@ -262,11 +262,11 @@
:malli.core/invalid))))

(defn alt-transformer [?kr & ?krs]
(reduce (fn [acc ?kr]
(reduce (fn [r ?kr]
(let [r* (entry->regex ?kr)]
(fn [driver regs coll* pos coll k]
(park-transformer! driver r* regs coll* pos coll k) ; remember fallback
(park-transformer! driver acc regs coll* pos coll k))))
(park-transformer! driver r regs coll* pos coll k))))
(entry->regex ?kr) ?krs))

;;;; ## Option
Expand Down

0 comments on commit 4a44848

Please sign in to comment.