Re: cond and :>>

2017-06-09 Thread damien . ragoucy
Indeed, I misunderstood it. Thanks! Le vendredi 9 juin 2017 19:57:11 UTC+2, Alex Miller a écrit : > > I'm not positive, but I think you may be misunderstanding the effect of > :>> in condp. When it's used the true condition input is used to invoke a > function rather than evaluate an expressio

cond and :>>

2017-06-09 Thread damien . ragoucy
Hello, A simple question: why does condp supports optional :>> syntax and not cond? I feel that it would be nice for readability to have it, either "horizontally": (cond (= x y) :>> (let [foo 1 bar 2] ;; ... ) (and (odd? x) (odd? y)) :>> (

Re: Validate different maps that have the same keys in the same namespace

2016-11-18 Thread damien . ragoucy
Got it. Thanks for the answers. I still feel that the global registry for specs is weird. It seems so easy to have namespaced keyword conflicts coming from various namespaces, specially in big projects where people don't know well each other's work. It is quite different from the regular Cloju

Re: Validate different maps that have the same keys in the same namespace

2016-11-17 Thread damien . ragoucy
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

Validate different maps that have the same keys in the same namespace

2016-11-17 Thread damien . ragoucy
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

Gettext key extraction through macro

2016-03-03 Thread damien . ragoucy
Hello everyone, I have a ClojureScript project and I'd like to extract the text to be translated at compile time. The inspiration comes from an Elixir library , as explained in this video . I'm able to extract