requisito v0.0.1 Requisito

Documentation for Requisito.

Summary

Functions

conform takes a predicate and a value and checks whether or not the value conforms to the predicate

valid? returns a boolean indicating whether or not a value is a property of a particular predicate

Functions

conform(predicate, value)
conform((... -> any), any) :: atom | any

conform takes a predicate and a value and checks whether or not the value conforms to the predicate.

Examples

iex> Requisito.conform( &Integer.is_odd/1, 27)
true
iex> Requisito.conform( &Integer.is_odd/1, 30)
:requisito_invalid
valid?(predicate, value)
valid?((... -> any), any) :: boolean

valid? returns a boolean indicating whether or not a value is a property of a particular predicate.

Examples

iex> Requisito.valid?(&Integer.is_odd/1, 27) true iex> Requisito.valid?(&Integer.is_odd/1, 10) false