パッケージAでジェネリックを定義し、CLOSのパッケージBでこのジェネリックのメソッドを提供する正しい方法は何ですか?
前もって感謝します!
例:
(defpackage :common (:use :cl))
(in-package :common)
(defgeneric compare (a b))
(defmethod compare ((a number) (b number))
(cond ((< a b) -1)
((= a b) 0)
(T 1)))
(defpackage :a (:use :cl))
(in-package :a)
(defclass foo (a b))
(defmethod compare ((x foo) (y foo)) ...)
; SBCL isn't able to access this method via the common package