This PR adds a variation of mapInputT that only works on the unit type.
mapInputT_ :: (m () -> m ()) -> InputT m () -> InputT m ()
mapInputT_ f = InputT . mapReaderT (mapReaderT (mapReaderT
(mapReaderT (mapReaderT f))))
. unInputT
Note that mapInputT_ cannot be implemented in terms of mapInputT because of the forall b quantifier inside the first argument of mapInputT. Thus, it makes sense to also export mapInputT_, since there are cases in which it can be useful.
This PR adds a variation of
mapInputT
that only works on the unit type.Note that
mapInputT_
cannot be implemented in terms ofmapInputT
because of theforall b
quantifier inside the first argument ofmapInputT
. Thus, it makes sense to also exportmapInputT_
, since there are cases in which it can be useful.