Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your revised question is straightforward, simply</p> <pre><code>f @@ {a,b,c,...} == f[a,b,c,...] </code></pre> <p>where <code>@@</code> is shorthand for <a href="http://reference.wolfram.com/mathematica/ref/Apply.html?q=Apply&amp;lang=en" rel="nofollow noreferrer"><code>Apply</code></a>. Internally, <code>{a,b,c}</code> is <code>List[a,b,c]</code> (which you can see by using <a href="http://reference.wolfram.com/mathematica/ref/FullForm.html?q=FullForm&amp;lang=en" rel="nofollow noreferrer"><code>FullForm</code></a> on any expression), and <code>Apply</code> just replaces the <a href="http://reference.wolfram.com/mathematica/ref/Head.html?q=Head&amp;lang=en" rel="nofollow noreferrer"><code>Head</code></a>, <code>List</code>, with a new <code>Head</code>, <code>f</code>, changing the function. The operation of <code>Apply</code> is not limited to lists, in general</p> <pre><code>f @@ g[a,b] == f[a,b] </code></pre> <p>Also, look at <a href="http://reference.wolfram.com/mathematica/ref/Sequence.html?q=Sequence&amp;lang=en" rel="nofollow noreferrer"><code>Sequence</code></a> which does</p> <pre><code>f[Sequence[a,b]] == f[a,b] </code></pre> <p>So, we could do this instead</p> <pre><code>f[ Sequence @@ {a,b}] == f[a,b] </code></pre> <p>which while pedantic seeming can be very useful.</p> <p><strong>Edit</strong>: <code>Apply</code> has an optional 2<sup>nd</sup> argument that specifies a level, i.e.</p> <pre><code>Apply[f, {{a,b},{c,d}}, {1}] == {f[a,b], f[c,d]} </code></pre> <p>Note: the shorthand for <code>Apply[fcn, expr,{1}]</code> is <code>@@@</code>, as discussed <a href="https://stackoverflow.com/questions/1141166/in-mathematica-what-does-mean">here</a>, but to specify any other level description you need to use the full function form.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload