The generators neg-int and pos-int generate 0, which is confusing as (= (pos? 0} (neg? 0) false). The suggestion is to change s-pos-int and s-neg-int to pos-int and neg-int respectively, and replace the current neg-int and pos-int. Suggestions for new names include non-x-int and not-x-int.
I think pos-int and neg-int should be deprecated (due to the confusing names), and probably not replaced. pos-int is just nat, and neg-int is a bizarre distribution that is easy enough to make yourself.
I'd like a somewhat rethought set of integer generators and am not confident what that would look like, but I do know for sure that it wouldn't involve these two, so deprecating them should be safe.
Ghadi ShaybanMarch 5, 2018 at 6:20 PM
users of this generator via clojure.spec never see the zeros
The generators
neg-int
andpos-int
generate0
, which is confusing as(= (pos? 0} (neg? 0) false)
. The suggestion is to changes-pos-int
ands-neg-int
topos-int
andneg-int
respectively, and replace the currentneg-int
andpos-int
. Suggestions for new names includenon-x-int
andnot-x-int
.Original issue