[ENH][ANSI] Collection>>allSatisfy:
Doug Way
dway at riskmetrics.com
Wed Jul 5 14:32:17 UTC 2000
By the way, Collection>>allSatisfy: was in fact added to the base 2.8a image, in changeset 2107.
(For what it's worth, I think allSatisfy: and anySatisfy: are both excellent names... they're more
intention revealing than, say, conform:.)
- Doug Way
dway at mat.net, @riskmetrics.com
RiskMetrics Group, Ann Arbor, MI
http://www.riskmetrics.com
Marcel Weiher wrote:
> The ANSI spec (or at least the draft) specifies an #allSatisfy:
> method in Collection similar to #anySatisfy:, which doesn't seem to
> be in my 2.8a image. If it was added in the meantime and I missed
> it, please disregard:
>
> allSatisfy: aBlock
> "returns wether all the elements in the receiver satisfy
> the condition specified in aBlock"
>
> self do:[:item | (aBlock value: item) ifFalse: [^ false]].
> ^ true
More information about the Squeak-dev
mailing list
|