hllizi / phpmonads
Brings monads to php; defines a monad trait and several monads
0.0.2
2019-03-05 20:24 UTC
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: >=7.5.2
This package is auto-updated.
Last update: 2026-03-08 05:36:53 UTC
README
This repository defines a trait MonadTrait. The trait demands two abstract methods to be implemented by every using class, bind and return. These correspond to >>= and "return" in Haskell's Monad interface. The trait further implements join() and map() on the basis of these two methods, thus providing a thicker interface.