title: Pass an extra argument to a callback function
body: <p>I have a function <code>callWithMagic</code> which takes a callback function as a parameter and calls it with one argument.</p>
  
  <pre><code>const callWithMagic = callback =&gt; {
    const magic = getMagic();
    callback(magic);
  };
  </code></pre>
  
  <p>I also have a function <code>processMagic</code> which takes two arguments: <code>magic</code> and <code>theAnswer</code>.</p>
  
  <pre><code>const processMagic = (magic, theAnswer) =&gt; {
    someOtherMagic();
  };
  </code></pre>
  
  <p>I want to pass the function <code>processMagic</code> as an argument to <code>callWithMagic</code>, but I also want to pass <code>42</code> as the second parameter (<code>theAnswer</code>) to <code>processMagic</code>. How can I do that?</p>
  
  <pre><code>callWithMagic(&lt;what should I put here?&gt;);
  </code></pre>