# `Tempus.Slots.Group`
[🔗](https://github.com/am-kantox/tempus/blob/v1.0.0-rc.0/lib/tempus/slots/group.ex#L1)

The protocol to implement for the ordered collection of slots.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `add`

```elixir
@spec add(t(), Tempus.Slot.origin()) :: t()
```

Adds a single `t:Slot.t/0` instance to this `t:Slots.t/1` (which is effectively `Slots.t(t())`)
  implementation. If `merge/3` implementation returns `{:error, __MODULE__}`,
  this function would be used to add elements one by one through `reduce/3`.

# `add`

```elixir
@spec add(t(), Tempus.Slot.origin(), keyword()) :: t()
```

Adds a single `t:Slot.t/0` instance to this `t:Slots.t/1` (which is effectively `Slots.t(t())`)
  implementation. If `merge/3` implementation returns `{:error, __MODULE__}`,
  this function would be used to add elements one by one through `reduce/3`.

# `flatten`

```elixir
@spec flatten(t()) :: [Tempus.Slot.t()]
```

Flattens the implementation, returning the list back.

# `flatten`

```elixir
@spec flatten(
  t(),
  keyword()
) :: [Tempus.Slot.t()]
```

Flattens the implementation, returning the list back.

# `identity`

```elixir
@spec identity(t()) :: t()
```

The function returning the identity element, which can be merged into
each and every implementation without changing it.

# `inverse`

```elixir
@spec inverse(t()) :: {:ok, t()} | {:error, module()}
```

Efficient implementation of inversing slots. If this function
  returns `{:error, __MODULE__}`, the `reduce/3` will be used instead.

# `inverse`

```elixir
@spec inverse(
  t(),
  keyword()
) :: {:ok, t()} | {:error, module()}
```

Efficient implementation of inversing slots. If this function
  returns `{:error, __MODULE__}`, the `reduce/3` will be used instead.

# `merge`

```elixir
@spec merge(t(), [Tempus.Slot.t()] | t()) :: {:ok, t()} | {:error, module()}
```

Efficient implementation of merging slots. If this function
  returns `{:error, __MODULE__}`, the `reduce/3` will be used instead.

# `merge`

```elixir
@spec merge(t(), [Tempus.Slot.t()] | t(), keyword()) ::
  {:ok, t()} | {:error, module()}
```

Efficient implementation of merging slots. If this function
  returns `{:error, __MODULE__}`, the `reduce/3` will be used instead.

# `split`

```elixir
@spec split(t(), Tempus.Slots.locator()) :: {:ok, t(), t()} | {:error, module()}
```

Efficient implementation of splitting slots. If this function
  returns `{:error, __MODULE__}`, the `reduce/3` will be used instead.

# `split`

```elixir
@spec split(t(), Tempus.Slots.locator(), keyword()) ::
  {:ok, t(), t()} | {:error, module()}
```

Efficient implementation of splitting slots. If this function
  returns `{:error, __MODULE__}`, the `reduce/3` will be used instead.

---

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