# Logic

How you write what your app does: functions and actions, variables and
constants, statements, operators, `match`, `attempt` and loops, and what
Jadpo allows for passing functions, recursion and generic code.

| Page | What it covers |
|---|---|
| [Functions and actions](/docs/functions-and-actions.md) | You write behaviour in three kinds of callable. |
| [Variables](/docs/variables.md) | A variable never changes unless you write `var mut`, and every variable states its type (Values and types). |
| [Constants](/docs/constants.md) | A `constant` names a fixed value at the top of a file. |
| [Statements](/docs/statements.md) | A body is a list of statements, one on each line, with no semicolons. |
| [Expressions and operators](/docs/expressions-and-operators.md) | "Widening" is one type standing in for another it is built on (When one type can stand in for another). |
| [Match](/docs/match.md) | `match` chooses between the cases of a value. |
| [Attempt](/docs/attempt.md) | A call that can fail must say so where it is called. |
| [Loops](/docs/loops.md) | `for item in items` goes through a list, and the loop variable takes its type from the list. |
| [Passing functions](/docs/passing-functions.md) | You can pass an inline function only as an argument to a standard-library operation, such as `list.map` or `list.filter`. |
| [Recursion](/docs/recursion.md) | A function may call itself, or form a cycle with other functions. |
| [Generic code](/docs/generic-code.md) | Only the standard library is generic (`List<T>`, `list.count`). |

[What is built](/docs/logic-built.md) says which of this works today.
