r4743: Auto commit for Debian build
[kmrcl.git] / lists.lisp
index dee8317518d8312902e52a11381c193d1ddd9384..ef134538c9e49af564b88df2ff5e7b1cf0c01841 100644 (file)
@@ -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
 ;;;;
            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)