(defun liz () (let ((input nil) (inputline nil)) (loop do (terpri) (princ ": ") (setq inputline (read-line)) (when (string= inputline "end.") (return)) (setq input (process inputline)) (when (not (null input)) (princ (dealwith input)) (terpri)))) 'Bye) (defun process (str) (let ((allchars (coerce str 'list)) (word nil) (line nil) (ignores '(#\' #\")) (spaces '(#\space #\. #\! #\? #\,))) (dolist (ch allchars) (cond ((member ch spaces) (unless (null word) (setq line (cons (intern (coerce (reverse word) 'string)) line)) (setq word nil))) ((member ch ignores) nil) (t (setq word (cons (char-upcase ch) word))))) (unless (null word) (setq line (cons (intern (coerce (reverse word) 'string)) line))) (reverse line))) (defun dealwith (input) (append '(you said) input))