(exercise spec)
(exercise spec n)
(exercise spec n overrides)
generates a number (default 10) of values compatible with spec and maps conform over them,
returning a sequence of [val conformed-val] tuples. Optionally takes
a generator overrides map as per gen
Source
(defn exercise
"generates a number (default 10) of values compatible with spec and maps conform over them,
returning a sequence of [val conformed-val] tuples. Optionally takes
a generator overrides map as per gen"
([spec] (exercise spec 10))
([spec n] (exercise spec n nil))
([spec n overrides]
(map #(vector % (conform spec %)) (gen/sample (gen spec overrides) n))))