Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun punctuation-p (char) (find char "[!,?.\_'@]+"))
- (defun read-line-no-punct ()
- "Read an input line, ignoring punctuation."
- (read-from-string
- (concatenate 'string "(" (substitute-if #\space #'punctuation-p
- (read-line))
- ")")))
- (defun print-lines (lst)
- (format t "~d ~%~{~:(~a~)~%~}" (length lst) lst))
- (print-lines (read-line-no-punct))
Advertisement
Add Comment
Please, Sign In to add comment