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

Nils M Holm holm at t3x.org
Wed Nov 1 05:35:09 EST 2006


---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---

Name: Nils M Holm
Mail: holm at t3x.org
Type of issue: Defect
Priority: Major
R6RS component: Libraries
Version: 5.91
Summary: FIND delivers an ambiguous value

Description:

The FIND procedure described on page 63 can deliver an ambiguous
return value when applied to a list of booleans:

(find not '(#f)) => #f
(find not '(#t)) => #f

Proposed improvement: return the tail of the sublist beginning
with the first member satisfying the predicate:

(find not '(#t #f #t)) => (#f #t)
      (find not '(#f)) => (#f)
      (find not '(#t)) => #f

This modification would not only eliminate the ambiguity described
above but also make FIND more compatible to MEMBER and friends.

-- 
Nils M Holm <holm at t3x.org> -- http://t3x.org/nmh/




More information about the r6rs-discuss mailing list