[squeak-dev] String >> #numArgs

John Pfersich smalltalker2 at mac.com
Mon Dec 16 03:57:37 UTC 2019


Besides 2 raisedTo: 3  should answer 8, not 5.

/————————————————————/
For encrypted mail use jgpfersich at protonmail.com
Get a free account at ProtonMail.com
Web: www.objectnets.net and www.objectnets.org

> On Dec 15, 2019, at 03:15, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> 
> 
> Hi all!
> 
> 
> 
> Consider the following:
> 
> 
> 
> foo := [:a :b | a raisedTo: b].
> bar := #raisedTo:.
> 
> foo value: 2 value: 3. "5"
> bar value: 2 value: 3. "5"
> 
> foo numArgs. "2"
> bar numArgs. "1"
> 
> How can I overcome this inconsistency?
> 
> In situations where a symbol acts as "evaluable", quaking like a block, it is confusing to get these different results
> 
> Does there already exist a unified protocol? Or am I doing something wrong in general when I need this?
> 
> 
> 
> Best,
> 
> Christoph
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191215/a3df51ea/attachment.html>


More information about the Squeak-dev mailing list