<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#333333" bgcolor="#FFFFFF">
Hello,<br>
<br>
I'm currently going through the Handbook slowly to get myself ready
to make some videos for self-starters. The question about local vars
last time was also in this regard.<br>
Now I'm I'm stuck around chapter 3.2. I would (as always) really
appreciate your help! <br>
<br>
1. binary slots (§ 3.2.3) <br>
<br>
I'm having trouble getting the example to work. This is probably due
to the lack of my understanding.<br>
Example:<br>
<pre><span class="p">(</span> <span class="o">|</span>
<span class="o">+</span> <span class="o">=</span> <span class="p">(</span> <span class="o">|</span> <span class="p">:</span><span class="n">arg</span> <span class="o">|</span> <span class="p">(</span><span class="n">clone</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">+</span> <span class="n">arg</span> <span class="n">x</span><span class="p">)</span> <span class="n">y</span><span class="p">:</span> <span class="n">y</span> <span class="o">+</span> <span class="n">arg</span> <span class="n">y</span> <span class="p">)</span><span class="o">.</span>
<span class="o">|</span> <span class="p">)
This will create a Slot object with a slot "+ arg (clone x: ..."
I then create another slot object with
a parent*-slot the the one I just created
a parent2*-slot to traits clonable
x-slot
y-slot
How would I call call + now? "self + self"?
2. Annotations / Grouping (§ 3.2.5)
The handbook says, that the below creates a new slot containing a group "accessing"
</span>( |
{ ’Category: accessing’
getOne = (...).
getAnother = (...).
}
| )
That's working so far. But it creates a *new* object. What would I do, if I would like to *add* a group / annotation to an already existing object?
Best regards
Chris
<span class="p"></span></pre>
</body>
</html>