[Haskell-beginners] Re: \x -> x < 0.5 && x > -0.5

Heinrich Apfelmus apfelmus at quantentunnel.de
Tue Oct 20 06:08:19 EDT 2009

Brent Yorgey wrote:
> Note that little-r 'reader' is just an informal name for the ((->) e)
> monad, which is what your code was using.  Control.Monad.Reader also
> provides the big-R 'Reader' type, which is just a newtype wrapper
> around a little-r reader, and does indeed have a 'runReader' method
> (which just removes the newtype constructor).  That is,
> newtype Reader r a = Reader { runReader :: r -> a }
> C.M.Reader also provides ReaderT, a monad transformer version of Reader.

I thought Control.Monad.Reader also provides the needed

   instance Monad ((->) r)

but this is actually provided by  Control.Monad.Instances .



More information about the Beginners mailing list