Generic function?
<p>I'm trying to figure out the answer to this question:</p>

<blockquote>
  <p>Without using Javascript's bind function, implement the magic function so that:</p>

<pre><code>var add = function(a, b) { return a + b; }
var addTo = add.magic(2);

var say = function(something) { return something; }
var welcome = say.magic('Hi, how are you?');

addTo(5) == 7;
welcome() == 'Hi, how are you?';
</code></pre>
</blockquote>

<p>I think I need to use call or apply but I just don't know, if someone could point me in the right direction or provide some literature it would be much appreciated.</p>