;;; -*- mode: lisp -*-
;;; $Id: spellcheck.cmucl,v 1.2 2001/06/22 15:25:17 doug Exp $
;;; http://www.bagley.org/~doug/shootout/
(declare (optimize (speed 3) (debug 0) (safety 0)))
(let* ((dict (make-hash-table :test 'equal :size 10000)))
(with-open-file (dictfile "Usr.Dict.Words" :direction :input)
(do ((line (read-line dictfile)
(read-line dictfile nil 'eof)))
((eq line 'eof))
(setf (gethash line dict) t)))
(do ((word (read-line *standard-input*)
(read-line *standard-input* nil 'eof)))
((eq word 'eof))
(if (not (gethash word dict))
(write-line word))))