Congrats! I bought this monster and my Kindle reader said it was going to take
10 minutes just to read the table of contents =)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that po
Your spec names need different namespaces, but your functions do not:
(s/def :catalog-a/type #{"a" "b" "c"})
(s/def :catalog-a/ref string?)
(s/def :catalog-b/type #{:x :y :z})
(s/def :catalog-b/ref number?)
Then you need to say that the keys are unqualified when they appear in the
map for thi
(s/def :a/type #{"a" "b" "c"})
(s/def :a/ref string?)
(s/fdef get-product-from-catalog-a
:args (s/keys :req-un [:a/type :a/ref])
:ret any?)
;; ---
(s/def :b/type #{:x :y :z})
(s/def :b/ref number?)
(s/fdef get-product-from-catalog-b
:args (s/keys :req-un [:b/type :b/ref])
:ret any?)
I forgot the :req-un.
(s/fdef get-product-from-catalog-[a|b]
:args (s/keys :req-un [::type ::ref])
:ret any?)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new
Hello,
I started a new project with clojure.spec after a former project where I
used Prismatic schema.
There is one thing I really don't get: how can I define two specs for maps
with the same keys but not the same "types" in the same namespace?
Let's consider this example written with schema s
Dear Clojurians,
Skyscraper 0.2.3, an Enlive-based library for scraping information from
whole sites in a structural way, has been released.
Homepage / GitHub: https://github.com/nathell/skyscraper
Clojars: https://clojars.org/skyscraper
New in this release:
- New feature: Custom parse fu