X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=lists.lisp;h=ef134538c9e49af564b88df2ff5e7b1cf0c01841;hb=0fa8f28d8deecc9d2f42ab124826ba85040feefc;hp=dee8317518d8312902e52a11381c193d1ddd9384;hpb=b7af043786744aaf0b67a5ee6f4d42a647dc738d;p=kmrcl.git diff --git a/lists.lisp b/lists.lisp index dee8317..ef13453 100644 --- a/lists.lisp +++ b/lists.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: lists.lisp,v 1.1 2003/04/29 00:26:21 kevin Exp $ +;;;; $Id: lists.lisp,v 1.2 2003/05/02 22:30:26 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -69,6 +69,12 @@ it nil))))) +(defun flatten (lis) + (cond ((atom lis) lis) + ((listp (car lis)) + (append (flatten (car lis)) (flatten (cdr lis)))) + (t (append (list (car lis)) (flatten (cdr lis)))))) + ;;; Keyword functions (defun remove-keyword (key arglist)