# `Macaw.Layers.Callback`
[🔗](https://github.com/dcoai/macaw_layers/blob/v0.3.0/lib/macaw/layers/callback.ex#L1)

Whether a type module defines an optional callback, loaded or not (spec/01 §9).

`function_exported?/3` answers `false` for a module the VM hasn't loaded yet. Modules
load lazily in dev, test and `iex`, so a bare check can run before the type is loaded
and silently take the path of a type that lacks the callback. `exported?/3` loads the
module first, so the answer is the module's, whatever has run before.

# `exported?`

```elixir
@spec exported?(module(), atom(), arity()) :: boolean()
```

`true` when `module` defines `name/arity`, loading the module first. A module that
can't be loaded raises, as a type that doesn't exist is a mistake, not a type without
the callback.

    iex> Macaw.Layers.Callback.exported?(Macaw.Layers.Callback, :exported?, 3)
    true

---

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