I'd like to use it in my code and would rather not duplicate it, but since it involves only massively generic words like "function" or "composition" I can't find it by searching.
To be completely specific, I'm looking for
instance Functor (x->) where
fmap f p = f . p
This is the basic reader (or environment) monad, usually referred to as
((->) e)
. (This is(e ->)
written as a partially applied function instead of as a section; the latter syntax is problematic to parse.) You can get it by importingControl.Monad.Reader
orControl.Monad.Instances
.