.
On Wednesday, June 7, 2017 at 8:12:22 AM UTC-5, David Goldfarb wrote:
One big downside of using s/assert in a precondition: It does not work with
(s/nilable ...) specs, since s/assert returns valid values.
I fell into this trap for a moment of head-scratching just now.
On Wednesday, September
One big downside of using s/assert in a precondition: It does not work
with (s/nilable ...) specs, since s/assert returns valid values.
I fell into this trap for a moment of head-scratching just now.
On Wednesday, September 14, 2016 at 4:59:09 PM UTC+3, Alex Miller wrote:
>
> Another option tha
I'm starting to dive into clojure.spec, which is a strong motivation for me
to finally appreciate and use namespaced keywords -- an aspect of Clojure
that I've ignored until now.
I don't have a good sense of style re how to namespace keywords, especially
in standalone projects. I'm inclined to
ser/BAD 0] val: :boot.user/BAD fails spec: :boot.user/my-map
>> at: [0] predicate: #{:boot.user/a :boot.user/b}
>>
>> Seems better
>>
>> On Tuesday, September 20, 2016 at 5:38:10 AM UTC-7, David Goldfarb wrote:
>>>
>>> In clojure.spec, how can I declare a
In clojure.spec, how can I declare a map that accepts only certain keys?
*{::a 1 ::b 2 ::BAD 3}* does conform to *(s/keys :req :req [::a ::b])*, but
I want a spec that will be bothered by ::BAD or any other undeclared key.
My use case: I am introducing spec to some legacy code, and I want to b
Count me as another +1 for both these features.
On Thursday, May 30, 2013 4:25:22 AM UTC+3, Nelson Morris wrote:
>
> Good news everybody! As of leiningen 2.2.0 using `lein deps :tree` will
> perform version checks and version range detection. Therefore, I have
> deprecated lein-pedantic. I appr
Yes, I agree with you: better to bind outside the whole repl loop. I
misspoke when I said "around the printing".
That said, I think it might still be reasonable to put much tighter bounds
on the cotents inside the printing of "#< ... >".
David
On Thursday, July 11, 2013 3:09:07 PM UTC+3, Meike
The following pathological case triggers a confusing stack overflow error.
*$ lein repl*
*...*
*user=> (def x (atom nil))*
*#'user/x*
*user=> (reset! x x)*
*
*
*StackOverflowError java.util.regex.Pattern$Curly.match
(Pattern.java:4125)*
*
*
*;;; Of course, I can avoid the problem:*
*user=> (set