[Newbies] using collect on a ReadStream

Norbert Hartl norbert at hartl.name
Tue Oct 30 14:14:18 UTC 2007


On Tue, 2007-10-30 at 08:27 +0100, Oscar Nierstrasz wrote:
> Strange.  I do not see these methods supported by ReadStream in my  
> image.
> 
> I only see 13 implementors of #collect:
> 
> What does your implementation of ReadStream>>collect: say?
> 
Oh, I'm sorry. The methods in ReadStream are added by Glorp. So
I take another list for asking :)

FYI the implementation is

ReadStream>>collect: aBlock 
	| newStream |
	newStream := AddingWriteStream on: collection species new.
	[self atEnd] whileFalse: [newStream nextPut: (aBlock value: self
next)].
	^newStream contents

Norbert



More information about the Beginners mailing list