Sept. 29, 2012
11:50 a.m.
On 29 Sep 2012, at 12:22, Damien Cassou <damien.cassou@gmail.com> wrote:
for these kinds of queries, never forget to check streams:
aCollection asStream next: 10
In this case you can use #first: as others stated, but in many other cases streams will be the only way to solve your problem.
Yes, that is a good idea as well, and not even as inefficient as it seams. But the selector is #readStream (or #writeStream). Actually, using ReadStream class>>#on:from:to: can solve lots of problems efficiently as well. -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill