hllizi / phpmonads
Brings monads to php; defines a monad trait and several monads
Installs: 3 467
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 2
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: >=7.5.2
This package is auto-updated.
Last update: 2025-06-08 04:10:34 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.