Update of /project/mcclim/cvsroot/mcclim/ESA In directory clnet:/tmp/cvs-serv19125/ESA
Modified Files: utils.lisp packages.lisp Log Message: Add SUBTYPE-COMPATIBLE-P function to ESA.
--- /project/mcclim/cvsroot/mcclim/ESA/utils.lisp 2006/12/09 21:28:05 1.2 +++ /project/mcclim/cvsroot/mcclim/ESA/utils.lisp 2007/08/13 21:56:04 1.3 @@ -205,3 +205,10 @@ (if (and (eql a (car x)) (eql d (cdr x))) x (cons a d))))) + +(defun subtype-compatible-p (types) + "Return true if an element of `types' is a subtype of every +other type specifier in `types'. `Types' must be a list of type +specifiers." + (some (lambda (x) + (subtypep x `(and ,@types))) types)) --- /project/mcclim/cvsroot/mcclim/ESA/packages.lisp 2006/12/09 21:28:05 1.2 +++ /project/mcclim/cvsroot/mcclim/ESA/packages.lisp 2007/08/13 21:56:04 1.3 @@ -40,7 +40,8 @@ #:with-keywords-removed #:invoke-with-dynamic-bindings-1 #:invoke-with-dynamic-bindings - #:maptree)) + #:maptree + #:subtype-compatible-p))
(defpackage :esa (:use :clim-lisp :clim :esa-utils)