# `Yarnspinnex.HostFunctions`
[🔗](https://github.com/atavistock/yarnspinnex/blob/main/lib/yarnspinnex/host_functions.ex#L1)

Behaviour for the game-specific functions a script may call, beyond `Yarnspinnex.Functions`.

`declared/0` is read at compile time: it validates every call in the script and doubles as the
manifest an editor can list. `call/3` receives the context passed to `Yarnspinnex.step/3`
exactly as the host gave it.

# `call`

```elixir
@callback call(name :: String.t(), args :: [term()], context :: term()) :: term()
```

Evaluates a declared function against the caller's context.

# `declared`

```elixir
@callback declared() :: [{String.t(), non_neg_integer()}]
```

Every callable function as `{name, arity}`; the compiler rejects any call not listed here.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
