0.6.11.19:
[sbcl.git] / src / code / typedefs.lisp
index 57f432e..3d0c69f 100644 (file)
   (declare (type ctype type))
   `(specifier-type ',(type-specifier type)))
 \f
-;;;; utilities
-
-;;; sort of like ANY and EVERY, except:
-;;;   * We handle two-VALUES predicate functions like SUBTYPEP. (And
-;;;     if the result is uncertain, then we return (VALUES NIL NIL),
-;;;     just like SUBTYPEP.)
-;;;   * THING is just an atom, and we apply OP (an arity-2 function)
-;;;     successively to THING and each element of LIST.
-(defun any/type (op thing list)
-  (declare (type function op))
-  (let ((certain? t))
-    (dolist (i list (values nil certain?))
-      (multiple-value-bind (sub-value sub-certain?) (funcall op thing i)
-       (if sub-certain?
-           (when sub-value (return (values t t)))
-           (setf certain? nil))))))
-(defun every/type (op thing list)
-  (declare (type function op))
-  (let ((certain? t))
-    (dolist (i list (if certain? (values t t) (values nil nil)))
-      (multiple-value-bind (sub-value sub-certain?) (funcall op thing i)
-       (if sub-certain?
-           (unless sub-value (return (values nil t)))
-           (setf certain? nil))))))
+;;;; miscellany
 
 ;;; Look for nice relationships for types that have nice relationships
 ;;; only when one is a hierarchical subtype of the other.