# evaluate function

Evaluate an expression even where it would be held.

## How to write it

### evaluate(expr)

**expr**

Any expression: a number, a formula, a list or a matrix. Takes an expression.

## Examples

- $\displaystyle 1+1 = 2$

  `evaluate(1 + 1)`

  In the solver, `evaluate(1 + 1)` gives `2`.

  [Open in the solver](https://hilberon.com/?q=evaluate%281%20%2B%201%29)

## Related functions

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

  A function with no name; also written x => body.
- [divide_by](https://hilberon.com/library/divide_by)

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

  A value chosen by a test.
- [decrement](https://hilberon.com/library/decrement)

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

  Add 1 to a variable in place and return its old value.
- [construct](https://hilberon.com/library/construct)

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

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