# `TuningFork.State`
[🔗](https://github.com/jaman/tuning_fork/blob/v0.1.11/tuning_fork/lib/tuning_fork/state.ex#L1)

Values one loop leaves for another, read as they stood at the reader's own time.

    set(:key, :d_minor)
    get(:key, :c_major)

# `clear`

```elixir
@spec clear() :: :ok
```

Forget every value.

# `get`

```elixir
@spec get(term(), term()) :: term()
```

The newest value under `key` written at or before the reading round's time, or `default`
when there is none. Never blocks; outside a loop the time is `0`.

    iex> TuningFork.State.clear()
    iex> TuningFork.State.get(:missing, :nothing)
    :nothing

# `keys`

```elixir
@spec keys() :: [term()]
```

Every key with a value as of the reading round's time.

# `set`

```elixir
@spec set(term(), term()) :: term()
```

Store `value` under `key`, at the time of the round doing the writing.

    iex> TuningFork.State.clear()
    iex> TuningFork.State.set(:mood, :bright)
    iex> TuningFork.State.get(:mood)
    :bright

---

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