title: extending Function
body: <p>I've been seeing the syntax:</p>
  
  <pre><code>var module = {
  
      func: function(value) {
  
          some code;
  
      }.func2("value");
  
  }
  </code></pre>
  
  <p>cropping up in various places, as am wondering how this is done. I remember seeing an article about it a while back, but can't find it now. Whatever I try <code>.func2("value")</code> just trows syntax errors.</p>
  
  <p>For example, take a look at SproutCore's intro to their TemplateView. </p>
  
  <pre><code>Todos.StatsView = SC.TemplateView.extend({
    remainingBinding: 'Todos.todoListController.remaining',
  
    displayRemaining: function() {
      var remaining = this.get('remaining');
      return remaining + (remaining === 1 ? " item" : " items");
    }.property('remaining').cacheable()
  });
  </code></pre>
  
  <p>Seems like it would be a useful tool to give users when writing factories. </p>
  
  <p>Thanks. </p>