Han-Wen Nienhuys <[EMAIL PROTECTED]> writes:

> why do assq-ref and friends return #f when the key is not found, in
> stead of #<unspecified>? This makes it kind of hard to distinguish
> between an alist not containing KEY and  (KEY . #f)

Well, that would make it hard to distinguish between an alist not
containing KEY and (KEY . #<unspecified>)...

Actually, #<unspecified> is not intended to be used this way.  The
return value of some forms and procedures in R5RS is unspecified.
Since all forms and procedures in the evaluator actually do return a
value, they return #<unspecified>.

I think #f is the proper value to return from assq-ref.  This enables
you to do things like (and (assq-ref ...) ...).

Reply via email to