This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-28
Channels
- # announcements (6)
- # beginners (89)
- # boot (1)
- # calva (1)
- # cider (24)
- # cljsrn (19)
- # clojars (2)
- # clojure (102)
- # clojure-europe (2)
- # clojure-italy (9)
- # clojure-nl (1)
- # clojure-spec (6)
- # clojure-uk (56)
- # clojurescript (29)
- # code-reviews (14)
- # cursive (5)
- # data-science (1)
- # datomic (44)
- # duct (1)
- # emacs (10)
- # figwheel-main (5)
- # fulcro (8)
- # graphql (10)
- # hoplon (1)
- # leiningen (7)
- # overtone (17)
- # pathom (8)
- # re-frame (13)
- # slack-help (3)
- # spacemacs (22)
- # sql (2)
- # vim (3)
I tried to write a generator for arguments to assoc
. Not sure if this is the best way to get overrides for the generators:
https://github.com/slipset/speculative/blob/master/src/speculative/core.cljc#L66
Hey! How can I define mutually recursive specs? I tried (s/def :my/spec nil)
but it doesn’t seem to work
I think (in most cases?) it should work without you needing to register nil/dummy specs. Can you post a bigger example?
@U3DAE8HMG sure!
(s/def :elogic.negation/operand :elogic/formula)
(s/def :elogic/negation (s/keys :req [:elogic.negation/operand]))
(where a formula is later defined by referencing :elogic/negation)actually sorry, I just realised in this specific case the formula definition can be hoisted above the negation definition, even thought it references it
Here's a good example of mutually recursive specs by @U0FR82FU1