/** * reader :: Reader e m => a -> m a * * Put value inside ot the monad * * @param mixed $value * * @return M\Reader */ function value($value) { return M\Reader::of(function () use($value) { return $value; }); }
function ask($content) { return R::of(function ($name) use($content) { return $content . ($name == 'World' ? '' : ' How are you ?'); }); }