Subject: overriding system functions.

From: [email-masked] (Dan Stanger)
Date: Wed, 11 Jan 1995 18:27:39 -0700

i wish to define functions on sets such as intersection and implement the
sets using clos.  however, i wish to use the standard lisp intersection
within the clos methods.  is this possible using lisp?
thanks,
dan stanger

---

From: haible (Bruno Haible)
Date: Thu, 12 Jan 95 16:44:37 +0100

> within the clos methods.  is this possible using lisp?

Certainly. Something like this:

(defpackage "SETS" (:USE "COMMON-LISP") (:SHADOW "INTERSECTION"))
(in-package "SETS")
(defgeneric intersection (bag1 bag2 &key test test-not key))
(defmethod intersection ((bag1 sequence) (bag2 sequence) &rest more)
  (apply #'lisp:intersection bag1 bag2 more)
)

                    Bruno Haible
                    [email-masked]