Hello,
during my setup of a simple quaternions library I got this weird behaviour:
79454> uLisp 3.4
79999> (defun qtn (x i j k) (list x i j k))
qtn79978> (defun qx (q) (car q))
qx79966> (defun qi (q) (cadr q))
qi79955> (defun qj (q) (caddr q))
qj79944> (defun qk (q) (car (cdr (cddr q))))
qk79928> (defun q+ (a b)
(qtn (+ (qx a)(qx b))
(+ (qi a)(qi b))
(+ (qj a)(qj b))
(+ (qk a)(qk b))))
q+79883> (defvar q1 (qtn -1.0 2.0 3.0 3.0))
q179872> q1
(-1.0 2.0 3.0 3.0)79872> (q+ q1 q1)
(-2.0 4.0 6.0 6.0)79872> (defun q* (a b)
(qtn (- (* (qx a) (qx b)) (* (qi a) (qk b)))))
q*79842> (q* q1 q1)
Error: ‘qtn’ too few arguments
79842> (edit q*)
Error: unknown variable: (lambda (a b) (qtn (- (* (qx a) (qx b)) (* (qi a) (qk b)))))
Is it something expected? I don’t recall anything special about “q*” as special LISP form.
Thanks,
Fausto