<div dir="ltr"><div>I understand that the Squeak development environment provides a way to find methods by example. As a fun exercise I wanted to see if I could implement that in Cuis, minus the GUI. I created a <font face="monospace">Finder</font> class with a single class method <font face="monospace">methodsByExample</font> that does this. It's amazing how fast it is!</div><div><div><br></div><div>For example, evaluating the following in a Workspace:</div><div><br></div><div><font face="monospace">Finder methodsByExample: #(#(1 2 3 4) 2.5)</font></div><div><br></div><div>prints the following in the Transcript:</div><div><br></div><div><font face="monospace">The following methods on #(1 2 3 4) with no arguments return 2.5:<br>- average<br>- mean</font><br></div></div><div><br></div><div>The hardest part was discovering all the methods that have side effects which should not be attempted. Perhaps I haven't found all of them yet.</div><div><br></div><div>My code is in a package at <a href="https://github.com/mvolkmann/Cuis-Smalltalk-FindByExample">https://github.com/mvolkmann/Cuis-Smalltalk-FindByExample</a>. There are more examples in the README. I welcome feedback on ways this can be improved.</div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8000001907349px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div>