Skip to content

Commit

Permalink
Updated to Java commit 0bc837b (2016.06.10): add :args/:ret/:fn acces…
Browse files Browse the repository at this point in the history
…sors for fspecs
  • Loading branch information
dmiller committed Sep 24, 2016
1 parent 888705f commit 1773bba
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Clojure/Clojure.Source/clojure/spec.clj
Expand Up @@ -1415,6 +1415,16 @@ by ns-syms. Idempotent."
(reify
clojure.lang.IFn
(invoke [this x] (valid? this x))

clojure.lang.ILookup
(valAt [this k] (.valAt this k nil))
(valAt [_ k not-found]
(case k
:args argspec
:ret retspec
:fn fnspec
not-found))

Spec
(conform* [_ f] (if (fn? f)
(if (identical? f (validate-fn f specs *fspec-iterations*)) f ::invalid)
Expand Down

0 comments on commit 1773bba

Please sign in to comment.