title: CoffeeScript mixin doesn't work
body: <p>I found this example of mixins in <a href="https://github.com/jashkenas/coffee-script/wiki/FAQ#classes" rel="nofollow">coffeescript faq</a> but it seems like it doesn't work.</p>
  
  <p>Am I missing something here?</p>
  
  <pre><code>extend = (obj, mixin) -&gt;
    for name, method of mixin
      obj[name] = method
  
  include = (klass, mixin) -&gt;
    extend klass.prototype, mixin
  
  class Button
    onClick: -&gt; alert "click"
  
  class Events
  include Button, Events
  
  (new Events).onClick()
  
  # =&gt; Uncaught TypeError: Object #&lt;Events&gt; has no method 'onClick' 
  </code></pre>
  
  <p><a href="http://jsfiddle.net/XQwHa/" rel="nofollow">fiddle</a></p>