[Pharo-project] smalltalk: breaking out of a loop..
maxleske at gmail.com
Sun Nov 7 17:08:13 CET 2010
On 07.11.2010, at 17:04, sergio_101 wrote:
> if i have an OrderedCollection called people..
> if i have a million ordered pairs in there, and i wanna see af any one
> of them (hasTenBucks = true).
> i don't want to iterate all of them, i want to stop when i find that
> one hasTenBucks..
> so in something like:
> people do: [ :person | (person hasTenBucks) ifTrue; [break out of loop] ]
> ideas? thanks!
> photographer, journalist, visionary
More information about the Pharo-project