This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-15
Channels
- # beginners (11)
- # boot (80)
- # carry (1)
- # cider (5)
- # cljs-dev (290)
- # cljsrn (4)
- # clojure (50)
- # clojure-canada (5)
- # clojure-dev (2)
- # clojure-korea (2)
- # clojure-russia (17)
- # clojure-spec (22)
- # clojurescript (41)
- # cursive (12)
- # datomic (10)
- # figwheel (1)
- # hoplon (68)
- # klipse (1)
- # off-topic (1)
- # om (16)
- # onyx (15)
- # parinfer (1)
- # proto-repl (4)
- # proton (2)
- # re-frame (14)
- # reagent (12)
- # ring (5)
- # vim (4)
- # yada (34)
(above) Having a bit of confusion about when specs can be used in :ret
and when they can be used in spec/and
.
@samedhi the :fn
on line 24 is not supposed to be a spec
it's supposed to be a function that compares the args and the return value
and you can leave it off if you don't have anything obvious to check
that might not be your problem, I'm just guessing
@gfredericks Looking at http://clojure.github.io/clojure/branch-master/clojure.spec-api.html#clojure.spec/fdef, seems like a spec should be ok.
I would wager "A spec of the relationship..." is a typo, unless things have changed recently
I'll check on that actually
what's the latest clojure version
looks like there's 13
> Note that :fn specs require the presence of :args and :ret specs to conform values, and so :fn specs will be ignored if :args or :ret are missing.
Ugh, that line alone would have saved me hooours. I don’t know what you can do for people who don’t read the api docs (sorry), but figuring this out on my own just hurt.
looks like the s/and
thing does work, and I don't know why
so TIL I guess
@gfredericks Sounds good, yeah, no idea. Thanks for you help. TIL I should always read the docs right after going through the getting started section 😬