hash-map
function
clojure.test.check.generators/hash-map
(hash-map [& kvs])Like clojure.core/hash-map, except the values are generators.
Returns a generator that makes maps with the supplied keys and
values generated using the supplied generators.
(gen/sample (gen/hash-map :a gen/boolean :b gen/nat))
=> ({:a false, :b 0}
{:a true, :b 1}
{:a false, :b 2}
{:a true, :b 2}
{:a false, :b 4}
{:a false, :b 2}
{:a true, :b 3}
{:a true, :b 4}
{:a false, :b 1}
{:a false, :b 0})
Examples
No examples yet. Be the first to add one!