# `A2UICore.Functions.Basic`
[🔗](https://github.com/a2ui-elixir/a2ui/blob/v0.1.1/umbrella/apps/a2ui_core/lib/a2ui_core/functions/basic.ex#L1)

Implementations of the basic catalog's functions.

`implementations/2` returns `%{name => execute}` for a protocol
version; `A2UICore.Catalog.Basic` attaches them to the published
catalog document. Each `execute` takes the resolved arguments and the
`A2UICore.Resolution.DataContext` of the call and returns
`{:ok, value}` or `{:error, %A2UICore.Error{category: :expression}}`.

Version differences follow the reference:

  * v0.9 validators (`required`, `regex`, `length`, `numeric`,
    `email`) return booleans; v1.0 validators return a validation
    result `%{"valid" => boolean}` (`email` adds `code`, `message`,
    `severity` on failure);
  * v1.0 `and`/`or`/`not` treat a map with a boolean `"valid"` as
    true/false by validity; v0.9 treats it as an ordinary object;
  * v1.0 resolves `formatString` interpolations with `@path`/`@call`.

Locale-sensitive formatting goes through `A2UICore.Formatter`
(`:formatter` option, default `A2UICore.Formatter.Default`).

# `implementations`
*since 0.1.0* 

```elixir
@spec implementations(String.t(), keyword()) :: %{
  optional(String.t()) =&gt; A2UICore.Catalog.Function.execute()
}
```

The function implementations of the basic catalog of `version`.

Options: `:formatter` — an `A2UICore.Formatter` module.

---

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