[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: overriding system functions.
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de, haible@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Re: overriding system functions.
- From: haible (Bruno Haible)
- Date: Thu, 12 Jan 95 16:44:37 +0100
> 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:
(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
haible@ma2s2.mathematik.uni-karlsruhe.de