Problems with the Javascript proxy pattern
<p>Hi would like to create a function that takes one argument (a function) and proxies the function:</p>

<pre><code>function proxyFunc(func) {
  console.log("Proxying ", func.name);
  var proxied = func;
  func = function() {
   console.log("Calling proxied ", func.name);
   return proxied.apply(this, arguments);
  };
}
</code></pre>

<p>Unfortunately the proxying does not work. I already figured out that the assignment of the proxy function to the original function is the problem, but I don't know how to make it work:</p>

<pre><code>func = function() { ... }
</code></pre>
