Questions tagged [head]
41 questions
4
votes
1 answer
What is the definition of head in Mathematica?
I know (by practice) what a head is, but I am unable to find the appropriate words to actually define it. I would like to see a precise definition of head using the appropriate technical words involved. Hopefully, this should provide me with a…
user34309
3
votes
2 answers
Extracting terms with certain heads in a function
Given a function with several arguments
func[a,b,g1[x],g1[x,y],g2[1],g2[g1[1]],3]
I would like to extract all arguments with the head g1 and g2 as a list. So the output I am looking for is
{g1[x],g1[x,y],g2[1],g2[g1[1]]}
The way I used to…
mastrok
- 591
- 2
- 9
2
votes
2 answers
Understanding f /@ g[x,y,z]
According to the Mathematica guide,
In[26]:= f /@ g[x, y, z]
Out[26]= g[f[x], f[y], f[z]]
In a simple example, this works as desired with symbolic values:
In[139]:= f[a_] := a^2; g[x_, y_, z_] := x + y + z ;
f /@ g[x, y, z]
Out[140]=…
Minkowski
- 143
- 3
1
vote
1 answer
Parsing the link returned by CloudExport
Consider
Is there a way to make a function justLink that parses a CloudObject[] and returns just the string denoting the link (i.e., removes the CloudObject head?
George
- 3,145
- 7
- 21