[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Collection operations taking pseudo-predicates?
- To: address@hidden
- Subject: Re: Collection operations taking pseudo-predicates?
- From: Bruce Hoult <address@hidden>
- Date: Wed, 20 Mar 2002 06:30:01 -0500
- Organization: TelstraClear
- References: <3C986B2E.B8FA6711@lucent.com>
- Sender: "Gregory T. Sullivan" <address@hidden>
- User-agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
- Xref: traf.lcs.mit.edu comp.lang.dylan:14044
In article <3C986B2E.B8FA6711@lucent.com>,
Gabor Greif <ggreif@lucent.com> wrote:
> http://www.gwydiondylan.org/drm/drm_102.htm#HEADING102-0
>
> states under
>
> choose [Open Generic Function]
> ...
> Returns a sequence containing those elements of source-sequence that satisfy
> predicate.
> ...
>
>
> I wonder if a proper predicate is needed (i.e. one returning a <boolean>) or
> a pseudo-predicate
> ( whose result is compared against #f) is sufficient.
>
>
> Anybody who can shed light on this?
This is a theoretical question?
Clearly you have the Gwydion source, which says:
if (predicate(elem)) pair(elem, result) else result end
i.e. #f or non #f
-- Bruce