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

You thought you were kidding



)-:  Well, maybe we can't use setf to get sqrt, but:

(defsetf * (x &rest y) (newval)
  `(progn (setf ,x (/ ,newval ,@y)) ,newval))

(setf (* x 4) 24) => 24
   and now x => 6

I just tried this in VAX Common LISP.  It works fine.
--Guy