Following the comments on the answer here I would like to know if there is a way to deduce from the documentation if a built-in expression is a function or simply "a variable that stores something".
For the motivation you can look here: without knowing if object are wrapper or not it would have been impossible for me to know that First[ContourPlot] gives the good variable to provide to Epilog for instance.
For instance, looking at the docs for graphics, it is not possible to understand that "primitives" and "options" are not parameter to provide to the function "Graphics" but actually what is stored in a Graphics type variable.
I find the documentation extremly confusing to learn, which is why I ask my question.
Thus, my question is precisely:
- Is there a way from the documentation to know if the expression is a function or a variable storing something
- If not, can I use some way in Mathematica to know it
Graphicsfunction which constructs the graphics. That's what the documentation is saying by writing it asGraphics[primitives, options]. Usually the parameters are italicized and lowercase in the documentation, while the function names and directives start uppercased and are hyperlinked / blue. TheGraphicsdoesn't store anything. It's a function that takes a bunch of primitives, directives and options, and it takes that recipe to render the graphics. $\endgroup$Graphicsis an inert wrapper and not so much a function (the rendering is technically also not really done byGraphicsand more byMakeBoxesand the FE). If you look at the linked question, you can see that OP is asking how one can tell that a symbol is such an inert wrapper, and that it is therefore possible to extract the primitives simply by applyingFirst. $\endgroup$Epilogit is expecting primitives. It says in the documentation for things likePolygonandLine(expand the details and options section) that xxx can be used as a geometric region or a graphics primitive. If you dox = ContourPlot[...]; Head[x]you get aGraphics. So you knowxis a graphics and the form ofGraphicsisGraphics[primitives, options], so you know theFirstargument is a list of primitives. If a functionfis like a wrapper thing, then itsHeaddoesn't change when the function is used, e.gHead[f[2]] === f$\endgroup$Head[Graphics[{Red, Disk[]}]]is still aGraphics. By the way, if you want a list of primitives, expand the details and options section in theGraphicsdocumentation where it says The following graphics primitives can be used:... . Primitives are things likeArrow,AASTriangle,Disk,BezierCurveetc... $\endgroup$