PHP implementation of a couple of popular monads