(defun generate (phrase) "Generating a random sentences or phrase." (if (listp phrase) (mappend #'generate phrase) (let ((choices (rewrites phrase))) (if (null choices) (list phrase) (generate (random-elt choices))))))