[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LAMBDA expression to the SATISFIES type specifier



    Date: Wed, 11 Sep 85 16:36 EDT
    From: Guy Steele <gls@THINK-AQUINAS.ARPA>

    The case I was worried about was

    (defun foo (x y)
      (declare (type (satisfies (lambda (q) (eq q y))) x))
      ...)

That doesn't seem to me substantially different from

(defun foo (x)
  (flet ((foo-p (q) (eq q x)))
    (let ((y x))
      (declare (type (satisfies foo-p) y))
      ...)))

which the manual is quite clear on (it doesn't work).  I have no
objection to the first example not working either.  It seems that we
should allow LAMBDA expressions and be consistent about the lexical
environment for both functions and variables, presumably global.