# `syntax.function_keyword`

Function declared with `fn`, `func`, `def` or `fun`.

Area 3, [Logic](../topics/logic.md); not declinable; the next step is usually the agent's.

A function starts with `function`, not `fn`, `func`, `def` or `fun`.

```jadpo
type Count = Int {
    min: 0
}

fn same(count: Count) -> Count {
    return count
}
```

```text
error: Jadpo writes `function`, not `fn`
 --> main.jadpo:5:1
  |
5 | fn same(count: Count) -> Count {
  | ^^ write `function`
  reason: `fn` declares a function in Rust; Jadpo starts one with `function`, or `action` when it reads or writes stored data.
  next: Use `function` instead of `fn` (agent)
  rule: syntax.function_keyword
  help: https://jadpo.dev/docs/errors/syntax.function_keyword

check failed: 1 error, 1 file
```
