/** * runReader :: Reader e a -> e -> a * * Unwrap a reader monad computation as a function. * * @param M\Reader $reader * @param mixed $env * * @return mixed */ function runReader(M\Reader $reader, $env) { return $reader->runReader($env); }
function ask($content) { return R::of(function ($name) use($content) { return $content . ($name == 'World' ? '' : ' How are you ?'); }); }