<div dir="ltr"><div class="gmail_default" style="font-size:small">'this is great' indicesOfSubCollection: 'is' #(3 6)<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">:)</div><div class="gmail_default" style="font-size:small">Ron</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 31, 2020 at 4:59 PM Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Eliot, <div><br></div><div>I have no opinion about the inclusion of the methods, only about the variable name "aSubCollection".  Anytime I see a variable named with prefix "a" or "an", I consider what follows to be a class in the system.  In fact, the IDE does, too, which is why you can simply double-click on the argument and it'll open a browser on that class.  Since "SubCollection" is already part of the selector, "aCollection" seems like it should be a fine argument.  Otherwise, "subCollection" (as in the legacy method you're calling) or "aSequenceableCollection".</div><div><br></div><div>Best,</div><div>  Chris</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 31, 2020 at 1:57 PM Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div>SequenceableCollection methods for accessing<div><div>indicesOfSubCollection: aSubCollection</div><div><span style="white-space:pre-wrap">       </span>"Answer an Array (possibly empty) of all the indices of aSubCollection in the receiver."</div><div><br></div><div><span style="white-space:pre-wrap">      </span>^self indicesOfSubCollection: aSubCollection startingAt: 1</div><div><br></div><div><div>indicesOfSubCollection: aSubCollection startingAt: initialIndex</div><div><span style="white-space:pre-wrap">     </span>"Answer an Array (possibly empty) of all the indices of aSubCollection in the receiver starting at</div><div><span style="white-space:pre-wrap">  </span> initialIndex. N.B. This does not (yet) use Boyer-Moore to skip over unnecessary alignments."</div><div><br></div><div><span style="white-space:pre-wrap">      </span>^Array streamContents:</div><div><span style="white-space:pre-wrap">           </span>[:s| | index |</div><div><span style="white-space:pre-wrap">           </span> index := initialIndex - 1.</div><div><span style="white-space:pre-wrap">              </span> [(index := self indexOfSubCollection: aSubCollection startingAt: index + 1) = 0] whileFalse:</div><div><span style="white-space:pre-wrap">                    </span>[s nextPut: index]]</div></div><div dir="ltr"><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></div></div>
<br>
</blockquote></div>
<br>
</blockquote></div>