0.0.12 permalink Arrow_down_16x16
  • (list-of & generators)
Create a list of items taken at random from generators. List
size is random from *size*.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source circumspec/for_all.clj:11 top

(defn list-of
  "Create a list of items taken at random from generators. List
   size is random from *size*."
  [& generators]
  (let [gen (apply choose-from generators)]
    (fn [] (take (rand-int *size*) (repeatedly gen)))))
Vars in circumspec.for-all/list-of: defn fn let rand-int repeatedly take
Used in 0 other vars

Comments top

No comments for list-of. Log in to add a comment.