Hi, is there a better way to have a completely custom spec generator?
(let [my-custom-generating-fn #(do {:something (rand-int 100) :complicated (rand-int 200)})
g (gen/fmap #(%) (gen/return my-custom-generating-fn))]
(gen/generate g))
all the examples I found start from some primitive like (gen/int)
. Feels like what I was trying is intended to be difficult, is that because it doesn't follow some underlying random seed or something, or am I just missing the key bitCorrect - generally generators should control randomness, not introduce their own sources of randomness, as that makes it impossible to either shrink or regen from the same seed
very useful, thanks Alex
A one time shout out: finding specs by keyword is now a lot easier in clojure-lsp. You can even navigate to the definition of a spec via the keyword.