Calling self inside a method in smalltalk
<p>I'm trying to do an arithmetic sequence class in smalltalk, I'm having some trouble with doing a printOn method.
Here is the code I have, for some reason it would fail upon getting to the self part, I dont understand why though</p>

<pre><code>printOn: aStream
    |i retValue|
    retValue := ''.
    i := 0.
    [i &lt; myCount ] whileTrue: [retValue := retValue + ('', self valueOf: i). i := i -1.].
    aStream nextPutAll: retValue
</code></pre>