Function: sort-function-discriminators

Documentation

All we care about is that the catch-all class `t' doesn't shadow other classes. The actual class hierachy isn't important in urlmapping.

Source

(defun sort-function-discriminators (discriminators)
  " All we care about is that the catch-all class `t' doesn't shadow
other classes. The actual class hierachy isn't important in
urlmapping." 
  (stable-sort discriminators
	       (fn (lst1 lst2)
		 (loop
		    for e1 in lst1
		    for e2 in lst2 
		    when (and (eq e1 t) (not (eq e2 t))) do (return nil)
		    when (and (eq e2 t) (not (eq e1 t))) do (return t)))))
Source Context