title: object is not a function error
body: <p>With following code:</p>
  
  <pre><code>var App = (function(param)
  {
       return { foo : function() { alert(param); } }
  })();
  
  var d = App('test');
  d.foo();
  </code></pre>
  
  <p>I get error message:</p>
  
  <pre><code>object is not a function
  </code></pre>
  
  <p>What am I doing wrong here?</p>