title: Self argument in Scala
body: <p>This example is from one of the Scala books:</p>
  
  <pre><code>trait IO { self =&gt;
    def run: Unit
    def ++(io: IO): IO = new IO {
      def run = { self.run; io.run }
    } 
  }
  
  object IO {
    def empty: IO = new IO { def run = () }
  }
  </code></pre>
  
  <p>The explanation given in the book is as follows:</p>
  
  <p>The self argument lets us refer to this object as self instead of this. </p>
  
  <p>What would that statement mean?</p>