[Openmcl-devel] type specifier '(simple-vector n) in defmethod

Taoufik Dachraoui dachraoui.taoufik at gmail.com
Tue Jan 2 03:14:24 PST 2024


Hi

I am trying to use '(simple-vector n) as type specifier in defmethod but it
is not possible, is there another way?

(typep #(1 2 3 4) '(simple-vector 4))

(defmethod mul ((n fixnum) (m1 (simple-vector n)) (m2 (simple-vector n)))
  (let ((r (make-array (list n))))
    (dotimes (i n)
      (setf (svref r i) (* (svref m1 i) (svref m2 i))))
    r))

Kind regards
Taoufik Dachraoui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20240102/7e9a94d1/attachment.htm>


More information about the Openmcl-devel mailing list