# `Patterns.Guards`
[🔗](https://github.com/minnasoft/patterns/blob/v0.0.1/lib/patterns/guards.ex#L1)

Guard helpers for pattern modules.

# `is_keyword`
*macro* 

Returns true when `value` is keyword-shaped.

This guard intentionally checks only what Elixir guard expressions can check:
the value is a list and either empty or starts with a two-tuple whose key is an
atom.

Guards cannot call arbitrary functions or recursively inspect every element in
a list. See the Elixir documentation for the list of expressions allowed in
guards: https://hexdocs.pm/elixir/patterns-and-guards.html#guards

For example, `[{:name, "Rin"}, :bad]` is keyword-shaped for this guard because
the first element is a valid atom-key tuple, but it is not a valid keyword list.

Use `Keyword.keyword?/1` outside guards when every element must be validated.

---

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