Fork me on GitHub

Has anyone written a generator for keys that always chooses to generate optional entries until *recursion-limit* is reached?


It seems like this may not be possible currently because whenever a generator-creating function is allowed (`with-gen`, (keys :gen (fn [] ...))) it is takes 0 args while the default generator-creating functions take 3 args (`[overrides path rmap]`). Why do custom generators not have access to the current length of recursion?


I’ve got a pretty specific question regarding clojure spec-tools’s dataspecs - i’ve got those two data specs, how do I “or” them together?

{:status (s/spec #{200})
   :success boolean?
   :body {:data [{:id string?}]}}
{:status (s/spec #{500})
   :success boolean?
   :body empty?}