*Please make stest/instrument check :ret too, not only :args.*
I have been experimenting a lot with spec during December, and I really
like it. On the downside, the syntax is very verbose, compared to prismatic
schema. However, reuse is much simpler than for schemas.
I disagree with this decisi
Could someone explain why the first doesn't work and the 2nd does?
(let [{:keys [opt1]} [:opt1 true]] [opt1]) ==> [nil]
(let [{:keys [opt1]} '(:opt1 true)] [opt1]) ==> [true]
According to http://clojure.org/guides/destructuring
"Associative destructuring also works with lists of key-value pair
With clojure 1.8, we got many of these functions, but not str/length and
str/substring.
What am I missing?
/mattias
Den fredag 1 november 2013 kl. 19:40:42 UTC+1 skrev Sean Corfield:
>
> This thread made me run a quick audit of our code and we had about a
> dozen calls to .length, a dozen cal
Clojure and Erlang are very similar, except for the syntax, macros and that
you can use Java libraries.
There is one big difference: In Erlang, fail as early as possible is the
norm. In Clojure it is almost the opposite.
Many errors in Clojure code will result in nil, and most operations acce
I moved my own definition of defn to a separate project, and then it works.
It seems you cannot redefine defn within the same project it is used.
Den fredag 13 november 2015 kl. 13:46:56 UTC+1 skrev mattias w:
>
> I defined my own defn in the namespace mwm.
>
>
> My new code
I defined my own defn in the namespace mwm.
My new code looks like this
(mwm/defn foo [x] ...)
Everything was fine as long as it was called defn2, but after renaming it
to defn and refering to the original defn using clojure.core/defn, only
"lein uberjar" works.
When I run "lein run", th