derive.lisp 289 Bytes
Newer Older
ram's avatar
ram committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(in-package 'c)

(defun foo (x y z r)
  (declare (type (unsigned-byte 8) x)
	   (type (unsigned-byte 4) y)
	   (type (signed-byte 8) z)
	   (type unsigned-byte r))
  (values
   (+ x y)
   (+ y z)
   (+ z r)
   (- x y)
   (- y z)
   (- z r)
   (* x y)
   (* y z)
   (* z r)
   (ash z -2)))