
26 Jul
2013
26 Jul
'13
3:40 p.m.
On Fri, 26 Jul 2013, Greg Fitzgerald wrote:
Are there any examples of "nom" being useful?
I find 'nom' to be useful if defined as "const id":
-- Given 'om' om f m = (m >>=) . flip f
-- And 'nom' nom = const id
-- And the natural name for a monadic version of 'no'thing noM = return ()
-- We construct a useful example of 'nom': eatCookies :: IO () eatCookies = om nom noM noM
So far I was not convinced by the proposal. But this one seems to be really useful and a real world application!