   which makes returning true (i.e. lexemes first) increasingly likely
   as depth increases."
   [depth max-total-depth]
-  (if (not randomize-lexemes-before-phrases)
-    false
-    (if (> max-total-depth 0)
-      (let [prob (- 1.0 (/ (- max-total-depth depth)
-                           max-total-depth))]
-        (log/trace (str "P(c," depth ") = " prob " (c: probability of choosing lexemes rather than phrases given depth " depth ")"))
-        (> (* 10 prob) (rand-int 10)))
-      false)))
+  (and (not randomize-lexemes-before-phrases)
+       (> max-total-depth 0)
+       (let [prob (- 1.0 (/ (- max-total-depth depth)
+                            max-total-depth))]
+         (log/trace (str "P(c," depth ") = " prob " (c: probability of choosing lexemes rather than phrases given depth " depth ")"))
+         (> (* 10 prob) (rand-int 10)))))
 
 (defn not-fail? [arg]
   (not (= :fail arg)))

             (dag_unify.core/strip-refs (dissoc-paths % [[:head][:comp]]))
             %))

     ;; 11. Remove fails.
     (remove #(= :fail %))
     )))


(def ^:const handle-unify-fail #(log/debug %))
(def ^:const throw-exception-on-unify-fail false)


(def ^:const shufflefn
  (fn [x]
    ;; deterministic generation:
;;    x
    ;; nondeterministic generation
    (lazy-seq (shuffle x))

    ))

(def ^:const randomize-lexemes-before-phrases
;;  false
  true
  )

;; whether to remove [:head] and [:comp] paths from generated trees after generation:
;; for performance.
