hllizi/phpmonads

Brings monads to php; defines a monad trait and several monads

Maintainers

Package info

github.com/hllizi/PHPMonads

pkg:composer/hllizi/phpmonads

Statistics

Installs: 3 602

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 2

0.0.2 2019-03-05 20:24 UTC

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.