[r6rs-discuss] [Formal] FIND delivers an ambiguous value

AndrevanTonder andre at het.brown.edu
Wed Nov 1 17:51:16 EST 2006


On Wed, 1 Nov 2006, AndrevanTonder wrote:

> - keeping "find" as is, but
> - raising an error if the returned element would have been #f.

Slightly off-topic, but I couldn't resist:

An analogous case would be assp and, let's call it, uh, a**find
(see srfi-1 alist-ref).  I keep redefining a**find for my own purposes and I
keep running into obscure bugs because I forget to distinguish between

   (a**find (lambda (x) (eq? x 'a)) '((a . #f)))  ==> #f

and

   (a**find (lambda (x) (eq? x 'a)) '((b . 1)))   ==> #f

In this case also raising an error in the first case would be the safer thing
to do.

Andre



More information about the r6rs-discuss mailing list