
(defmacro gen (function)
  `(progn
     ,@(loop
	  for i from 0 to 3
	  collect
	    `(defun ,(intern (format nil "~A-~A" function i)) ()
	       (declare (optimize (safety ,i) (speed 3) (debug 0)))
	       (,function #(#\A #\B #\C) 4)))))

(gen aref)
(gen svref)
(gen char)
(gen schar)
(gen elt)

