Skip to content

Commit 34baf6b

Browse files
author
dnolen
committed
same as Clojure 0bc837b9
1 parent aaa281d commit 34baf6b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/cljs/cljs/spec.cljs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,15 @@
10521052
(reify
10531053
IFn
10541054
(-invoke [this x] (valid? this x))
1055+
ILookup
1056+
(-lookup [this k]
1057+
(-lookup this k nil))
1058+
(-lookup [_ k not-found]
1059+
(case k
1060+
:args argspec
1061+
:ret retspec
1062+
:fn fnspec
1063+
not-found))
10551064
Spec
10561065
(conform* [_ f] (if (fn? f)
10571066
(if (identical? f (validate-fn f specs *fspec-iterations*)) f ::invalid)

0 commit comments

Comments
 (0)