On Nov 1, AndrevanTonder wrote:
> On Wed, 1 Nov 2006, Shiro Kawai wrote:
>
> > But still, it's so frequent that it would deserve an abstraction.
>
> You and Eli have convinced at least me, with the following caveat: I am
> wondering if anyone would object to
>
> - keeping "find" as is, but
> - raising an error if the returned element would have been #f.
(Actually, I thought about a similar solution: raise an error if the
input list has #f, but that'll disqualify some useful cases. Your
suggestion is better.)
> This seems to attain the best of both worlds by keeping the
> convenience and avoiding the inaccuracy and fragility.
It'll be even better if it raises an error if #f would have been
returned -- and no default value was specified.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!
Received on Wed Nov 01 2006 - 18:55:34 UTC