Word search algorithms in LISP