[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: overriding system functions.

> 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?

Certainly. Something like this:

(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