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

From: AndrevanTonder <andre>
Date: Wed Nov 1 17:54:49 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
Received on Wed Nov 01 2006 - 17:51:16 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC