# construct function

Apply a head that is itself computed to arguments, as in f'(0) or (x => body)(a).

## How to write it

### construct(head, x, ...)

Partial derivatives of an unknown function print as construct(construct(derivative(0, 1), f), a, b).

**head**

A function or a derivative operator. Takes an expression.

**x**

An argument. Takes an expression.

## Examples

- $\displaystyle \sin' = \cos(\#1) \, \&$

  `construct(derivative(1), sin)`

  In the solver, `construct(derivative(1), sin)` gives `function(cos(slot(1)))`.

  [Open in the solver](https://hilberon.com/?q=construct%28derivative%281%29%2C%20sin%29)
- $\displaystyle \sin'(0) = 1$

  `construct(construct(derivative(1), sin), 0)`

  In the solver, `construct(construct(derivative(1), sin), 0)` gives `1`.

  [Open in the solver](https://hilberon.com/?q=construct%28construct%28derivative%281%29%2C%20sin%29%2C%200%29)

## Functions its examples use

- [derivative](https://hilberon.com/library/derivative)

  The derivative operator: derivative(n) is of order n, derivative(0, 1) is the partial in the second argument.

## Related functions

- [decrement](https://hilberon.com/library/decrement)

  Subtract 1 from a variable in place and return its old value.
- [add_to](https://hilberon.com/library/add_to)

  Add a value to a variable in place and return the new value.
- [divide_by](https://hilberon.com/library/divide_by)

  Divide a variable by a value in place and return the new value.
- [with_effort](https://hilberon.com/library/with_effort)

  Evaluate a body at quick, standard, deep or exhaustive effort.
- [evaluate](https://hilberon.com/library/evaluate)

  Evaluate an expression even where it would be held.
- [times_by](https://hilberon.com/library/times_by)

  Multiply a variable by a value in place and return the new value.

---
Source: https://hilberon.com/library/construct
