<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 11, 2014 at 3:13 AM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span> wrote:<br>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I think it might help in this case, to ask for the next object before evaluating the block in the loop of #allObjectsDo:<br>
<br>
        [lastObject == object]<br>
                whileFalse: [<br>
                        | nextObject |<br>
                        nextObject := object nextObject.<br>
                        aBlock value: object.<br>
                        object := nextObject]<br>
<br></blockquote><div><br></div><div>Yes, that&#39;s definitely an improvement. </div><div><br></div><div>One thing I still don&#39;t understand, though, is why we get 0. In theory, we need the sentinel to prevent an infinite loop, but when we skip over it, we still get to the end of the object memory. <br>
</div><div><br></div><div>Colin</div></div></div></div>