concrete-optics.algebra.axioms
Functions to test algebraic axioms of semigroups, monoids apply and applicatives.
associativity-axiom
(associativity-axiom semigroup x y z & [comparison-function])
Checks the associativity axiom of the given semigroup. Meant to be used in tests.
compose-functor-axiom
(compose-functor-axiom applicative f g x & [comparison-function])
Checks the composition axiom for fmap of a given applicative. Meant to be used in tests.
id-functor-axiom
(id-functor-axiom applicative x & [comparison-function])
Checks the identity axiom for fmap of a given applicative. Meant to be used in tests.
left-unit-axiom
(left-unit-axiom monoid x & [comparison-function])
Checks the left unit axiom of the given monoid. Meant to be used in tests.
lifted-associativity-axiom
(lifted-associativity-axiom applicative fx fy fz)
Checks the lifted assocaitivity axiom. Meant to be used in tests.
lifted-left-unit-axiom
(lifted-left-unit-axiom applicative fx)
Checks the lifted left identity axiom. Meant to be used in tests.
lifted-right-unit-axiom
(lifted-right-unit-axiom applicative fx)
Checks the lifted right identity axiom. Meant to be used in tests.
right-unit-axiom
(right-unit-axiom monoid x & [comparison-function])
Checks the right unit axiom of the given monoid. Meant to be used in tests.