Fork me on GitHub
#clojure-spec
<
2020-09-21
>
johanatan19:09:31

hi, is there any way to override the comparator used for :distinct calculations for s/coll-of ?

johanatan19:09:55

or is the best bet just to use s/and with a custom predicate ?

Alex Miller (Clojure team)19:09:49

no way to do that currently

Alex Miller (Clojure team)19:09:05

but s/and custom pred would work

adamfrey20:09:11

is there a way to do something like :gen-max on a regex s/cat spec?

Alex Miller (Clojure team)21:09:29

you can s/& a predicate to only accept smaller colls and that will have the same effect, but it's still producing the larger coll and that at least has memory implications (and may prevent such-that from succeeding at all)