<div dir="ltr"><div>Hi!<br><br></div>If your collection understands #readStream, you may write:<br><br><div><div>Puzzle &gt;&gt; blockIterating: aCollection<br><br>    ^[ :doBlock :whileBlock |<br>        | stream item |<br>        stream := aCollection readStream.<br>        [ stream atEnd not and: [ <br>            whileBlock value: (item := stream next) ] ] whileTrue: [<br>                 doBlock value: item ] ]<br><br></div><div>If it only understands #do:, you may wrap it in a Generator:<br><br>Puzzle &gt;&gt; blockIterating: aCollection<br><br>    ^[ :doBlock :whileBlock |<br>        | stream item |<br>        stream := Generator on: [ :g | <br>            aCollection do: [ :each | g nextPut: each ] ].<br>        [ stream atEnd not and: [ <br>            whileBlock value: (item := stream next) ] ] whileTrue: [<br>                 doBlock value: item ] ]<br><br></div><div>If it&#39;s not a requirement to return a Block, you may create a class, <br>whose instances respond to #value:value: and sidestep the problem.<br><br></div><div>Cheers, Balázs<br></div></div></div>