<div dir="ltr">Nicolas,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 9:40 AM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>The default behavior is to rely on ^self size = 0.<br></div>But default size is doing too much (it iterates over all elements).<br></div><div>It&#39;s OK for most of our classes which know very well about their size and override #size.<br></div>It&#39;s not OK for an eventually lazy or infinite subclass.<br></div></div></blockquote><div><br></div><div>Good catch.  Change it!</div><div><br></div><div>isEmpty</div><div>    self do: [:element| ^false].</div><div>    ^true</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div>I realized this by answering <a href="http://stackoverflow.com/questions/40149826/is-there-a-construct-like-iterate-iterable-if-it-has-elements-else" target="_blank">http://stackoverflow.com/<wbr>questions/40149826/is-there-a-<wbr>construct-like-iterate-<wbr>iterable-if-it-has-elements-<wbr>else</a></div></blockquote></div><br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>