Hi all,
Without having looked at the test.check internals, I'm trying to figure
out roughly what kind of generator function, the following spec will give:
(s/def ::predicate (s/fspec :args (s/cat :x any?)
:ret boolean?))
So, I'm trying to sort of reverse engineer it on the re
This is a late reply to my own question but maybe it will be helpful to a
future searcher.
http://blog.cognitect.com/blog/2016/10/5/interactive-development-with-clojurespec
has an example that showed me more clearly how to use :fn.
Specifically here's how I rewrote the spec:
(s/fdef mapper
Hello!
I experimented with overload resolution. And faced with a strange behavior.
https://gist.github.com/alejes/355881c1711224d5a773fbf0275b4898
The Clojure code calls a method from the Java. But at different runs I get
the result call different methods (4 and 6).
It is a simplified version
I find the semantic of the new (any?) function to be in conflict with
(not-any?) and a strange addition, at least with the chosen name. This
concern has come up on the "clojure dev" group as well. I have found a
different implementation of (any?) useful in my own projects:
(defn any?
[pred
On 6 November 2016 at 23:31, waffletower
wrote:
> I find the semantic of the new (any?) function to be in conflict with
> (not-any?) and a strange addition, at least with the chosen name. This
> concern has come up on the "clojure dev" group as well. I have found a
> different implementation o
I disagree, the new implementation is a subset of the code I presented.
Here is the docstring from 1.9.0-alpha14
(doc any?)
-
clojure.core/any?
([x])
Returns true given any argument.
There isn't a predicate function argument as in (not-any?):
(doc not-any?)
--
There was quite a discussion of this topic back in July if you'd like to
review it: https://goo.gl/Azy8Nf
The semantic mismatch is unfortunate.
Alan
On Sun, Nov 6, 2016 at 6:47 PM, waffletower
wrote:
> I disagree, the new implementation is a subset of the code I presented.
> Here is the docst
On Sunday, November 6, 2016 at 9:54:19 PM UTC-6, Alan Thompson wrote:
>
> There was quite a discussion of this topic back in July if you'd like to
> review it: https://goo.gl/Azy8Nf
>
> The semantic mismatch is unfortunate.
> Alan
>
It's not just a mismatch with not-any?, though. "any?" makes
On Monday, November 7, 2016 at 12:16:28 AM UTC-6, Mars0i wrote:
>
> "any?" wasn't the only option. I would have gone with something obvious
> like "always-true", or "yes", or even something possibly too-clever like
> "arg-or-not-arg?" or "or-not-this?"
>
Or maybe:
"argument?"
"value?"
"is-som