functional-php/fantasy-land
Fantasy Land–style algebraic structures for PHP to enable interoperable functional patterns. Includes interfaces for Setoid, Semigroup/Monoid, Functor, Applicative, Monad, Foldable/Traversable, plus ready-made law/property tests to verify implementations.
This project specifies interoperability of common algebraic structures in PHP.
The inspiration for this package is the fantastic fantasyland project [A].
The repository contains the following algebraic structures:
Each of those algebraic structures must obey some laws. In order to simplify their verification, the project provides encapsulated property tests. They can be used to easily verify the correctness of newly implemented structures.
You can find exemples on how to use those tests in the directory of examples
composer require functional-php/fantasy-land:^1
How can I help you explore Laravel packages today?