ate exponents with gen/s-pos-int (strictly positive integers),
;; and then apply the lambda to them
(def powers-of-two (gen/fmap #(int (Math/pow 2 %)) gen/s-pos-int))
(gen/sample powers-of-two)
;; =&gt; (2 2 8 16 16 64 16 2 4 4)
</code></pre>
<h2><a href="#sorted-seq-of-integers" name="sorted-seq-of-integers"></a>Sorted seq of integers</h2>
<pre><code class="clojure">;; apply the sort function to each generated vector
(def sorted-vec (gen/fmap sort (gen/vector gen/int)))
(gen/sample sorted-vec)
;; =&gt; (()