README.md

# Requisito

## Description

Conceptually, `Requisito` is based on clojure's [spec](https://clojure.org/guides/spec). However, it is in no way a one to one port of that api and is therefore free to deviate however it chooses, whether in naming or implementation.

#### Predicates

All predicates take a single argument value and return a boolean `true` or `false`.

```elixir
@spec predicate( any() ) :: boolean()
```

#### Conforming
Given a predicate and a value we can check if any particular value conforms to the predicate by using `conform/2`.

```elixir
@spec conform( fun(), any() ) :: atom() | any()
```

#### Validation
If you want a boolean return value you can use `valid?/2`
```elixir
@spec valid?( fun() , any() ) :: boolean()
```

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `requisito` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [{:requisito, "~> 0.1.0"}]
end
```


## Documentation
see: [https://hexdocs.pm/requisito](https://hexdocs.pm/requisito).