Skip to content

Commit 4ab28b4

Browse files
committed
Return already parsed patterns.
1 parent b035426 commit 4ab28b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/active/clojure/match.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@
411411
(defn parse-pattern
412412
"Parse the argument to `defpattern` as a [[Pattern]]"
413413
[name p]
414-
(make-pattern name (mapv parse-clause p)))
414+
(if (pattern? p)
415+
p
416+
(make-pattern name (mapv parse-clause p))))
415417

416418
;; Match
417419

0 commit comments

Comments
 (0)