head function
The head of an expression: the name of the function it is a call of.
How to write it
head(expr)
- expr
- Any expression: a number, a formula, a list or a matrix. Takes an expression.
Examples
head(f(x))In the solver,
Open in the solverhead(f(x))givesf.
Related functions
- intersection
The elements that are in every one of some lists.
- fold_list
The steps of fold: every partial result, starting from the first value.
- join
Join lists into one.
- fold
Combine the elements of a list from the left with a function, starting from a value.
- last
The last element of a list.
- flatten
Nested lists flattened into one list.