;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This file is part of AIslash. ; ; AIslash is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation, either version 3 of the License, or ; (at your option) any later version. ; ; AIslash is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with AIslash. If not, see . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun lt (x y) (if (string-lessp (format nil "~a" x) (format nil "~a" y)) t nil)) (defun nchars (n &optional (char #\Space)) (with-output-to-string (s) (dotimes (i n) (format s "~a" char )))) (defun whitespacep (char) (member char '(#\Space #\Tab #\Newline #\Page) :test #'char=)) (defun whiteout (seq) (remove-if #'whitespacep seq)) (defun samep (x y) (string= (whiteout (format nil "~(~a~)" x)) (whiteout (format nil "~(~a~)" y))))