 (defn elements
   "Create a generator that randomly chooses an element from `coll`.
 
-  Examples:
-
-      (gen/elements [:foo :bar :baz])
-  "
+      (gen/sample (gen/elements [:foo :bar :baz]))
+      => (:foo :baz :baz :bar :foo :foo :bar :bar :foo :bar)"
   [coll]
   (assert (seq coll) "elements cannot be called with an empty collection")
   (core/let [v (vec coll)]

      (def t (tuple gen/int gen/boolean))
      (sample t)
      ;; => ([1 true] [2 true] [2 false] [1 false] [0 true] [-2 false] [-6 false]
      ;; =>  [3 true] [-4 false] [9 true]))
  "
  [& generators]
  (assert (every? generator? generators)
          "Args to tuple must be generators")

;; ---------------------------------------------------------------------------

(defn fmap
  "Returns a generator like `gen` but with values transformed by `f`.
  E.g.:

      (gen/sample (gen/fmap str gen/nat))
      => (\"0\" \"1\" \"0\" \"1\" \"4\" \"3\" \"6\" \"6\" \"4\" \"2\")

  Also see gen/let for a macro with similar functionality."
  [f gen]
  (assert (generator? gen) "Second arg to fmap must be a generator")
  (gen-fmap #(rose/fmap f %) gen))
