(((?* ?x) I am sad (?* ?y)) (I am sorry to hear you are depressed) (I'm sure its not pleasant to be sad)) (((?* ?x) are like (?* ?y)) (What resemblance do you see between ?x and ?y)) (((?* ?x) is like (?* ?y)) (In what way is it that ?x is like ?y) (What resemblance do you see?) (Could there really be some connection?) (How?))
Write down 5 rounds of patient/ doctor dialogue supported by these patterns.
(defun mappend (fn list) (apply #'append (mapcar fn list)))
(defun numbers-and-negations (input) (mappend #'number-and-negation input)) (defun number-and-negation (x) "If x is a number, return a list of x and -x." (if (numberp x) (list x (- x)) nil))
(defun ordered (l &key (predicate #'<) (key #'identity)) (stable-sort (copy-list l) predicate :key key))
(defmacro ordered (l &key (predicate #'<) (key #'identity)) `(sort ,l ,predicate :key ,key))