title: Decorators on functions
body: <p>I see that babel.js decorators (available in "stage 1") implement the spec at <a href="https://github.com/wycats/javascript-decorators">https://github.com/wycats/javascript-decorators</a>. It appears that decorators are limited to (1) classes, (2) accessors, and (3) methods. In my case, I want to use decorators on plain old <strong>functions</strong>, as in </p>
  
  <pre><code>@chainable
  function foo() { }
  </code></pre>
  
  <p>where (just an example)</p>
  
  <pre><code>function chainable(fn) {
    return function() {
      fn.apply(this, arguments);
      return this;
    };
  }
  </code></pre>
  
  <p>I don't see any logical reason why decorators should not be able to apply to functions. My question is, is there some way to accomplish this? Or is there some good reason why functions cannot be decorated?</p>
  
  <p>It turns out there is an issue raised for this at <a href="https://github.com/wycats/javascript-decorators/issues/4">https://github.com/wycats/javascript-decorators/issues/4</a>.</p>