- `(progn
- (deftransform ,name ((item list &key key test test-not) * * :node node)
- (transform-list-item-seek ',name item list key test test-not node))
- ,@(when if/if-not
- (let ((if-name (symbolicate name "-IF"))
- (if-not-name (symbolicate name "-IF-NOT")))
- `((deftransform ,if-name ((pred list &key key) * * :node node)
- (transform-list-pred-seek ',if-name pred list key node))
- (deftransform ,if-not-name ((pred list &key key) * * :node node)
- (transform-list-pred-seek ',if-not-name pred list key node))))))))
+ (let ((basic (symbolicate "%" name))
+ (basic-eq (symbolicate "%" name "-EQ"))
+ (basic-key (symbolicate "%" name "-KEY"))
+ (basic-key-eq (symbolicate "%" name "-KEY-EQ")))
+ `(progn
+ (deftransform ,name ((item list &key key test test-not) * * :node node)
+ (transform-list-item-seek ',name item list key test test-not node))
+ (deftransform ,basic ((item list) (eq-comparable-type t))
+ `(,',basic-eq item list))
+ (deftransform ,basic-key ((item list) (eq-comparable-type t))
+ `(,',basic-key-eq item list))
+ ,@(when if/if-not
+ (let ((if-name (symbolicate name "-IF"))
+ (if-not-name (symbolicate name "-IF-NOT")))
+ `((deftransform ,if-name ((pred list &key key) * * :node node)
+ (transform-list-pred-seek ',if-name pred list key node))
+ (deftransform ,if-not-name ((pred list &key key) * * :node node)
+ (transform-list-pred-seek ',if-not-name pred list key node)))))))))