[ANSI-Smalltalk] List of interesting methods,
Collection satisfaction
Andres Valloud
andres.valloud at gmail.com
Tue Mar 25 02:52:39 GMT 2008
Hmmmmm... without meaning to propose the following seriously, perhaps it
would have been better to use an antonym of satisfy thus avoiding explicit
negation...
allFail: aBlock
anyFails: aBlock
... perhaps with a different verb. I tried looking for suitable
alternatives for a moment, but didn't find any that suited my fancy.
Andres.
On Mon, Mar 24, 2008 at 7:33 PM, cstb <jas at cruzio.com> wrote:
> At 12:51 AM 3/22/2008, Paolo Bonzini wrote:
> >Andres Valloud wrote:
> >>Oops! Thank you for the correction.
> >
> >Actually both are correct. I asked on
> http://en.wikipedia.org/Wikipedia:Reference_desk/Language (search for
> "None") and started a tiny flame war. :-)
>
>
> AllSatisfy: " for all x, ... is true "
> AnySatisfy: " there exists x such that ... is true "
>
> NotAllSatisfy: " there exists x such that ... is false "
> NotAnySatisfy: " for all x, ... is false "
>
> NoneSatisfy: " for all x, ... is false "
>
> The first three, and then either or both
> of the last two, above, would satisfy me.
>
> Because
> AllSatisfy: [:x| x _endsWith: 'fy']
> and
> NoneSatisfy: [:x| x _endsWith: 'fies']
>
> is easier to remember than
>
> NotAllSatisfy: [:x| x _endsWith: 'fy']
> and
> AnySatisfy: [:x| x _endsWith: 'fies'].
> are.
>
>
> (Hobgoblins not withwithstanding.)
>
> -Jim
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080324/982d67d8/attachment-0001.htm
More information about the ANSI-Smalltalk
mailing list