Function: get-function-discriminators

Documentation

Get the discriminators of a function and sort them appropriately to be used for urlmapping.

Source

(defun get-function-discriminators (function-name)
  "Get the discriminators of a function and sort them appropriately to
be used for urlmapping."
  (let ((discriminators
	 (mapcar (fn (method)
		   (mapcar (compose #'^symbol #'class-name)
			   (method-specializers method)))
		 (generic-function-methods (symbol-function
					    function-name)))))
    (sort-function-discriminators discriminators)))
Source Context