[squeak-dev] Re: A little puzzle

marcel.taeumel Marcel.Taeumel at hpi.de
Thu May 14 16:40:14 UTC 2015


Here without exceptions:

list := 1 to: 10.
iterator := [:doBlock :whileBlock |
	list detect: [:ea | | result |
		(result := whileBlock value: ea)
			ifTrue: [doBlock value: ea].
		result not] ifNone: []].

Best,
Marcel



--
View this message in context: http://forum.world.st/A-little-puzzle-tp4826352p4826373.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list