Control.Monad: +void :: f a -> f ()
authorgwern0@gmail.com <unknown>
Fri, 8 Jan 2010 21:44:55 +0000 (21:44 +0000)
committergwern0@gmail.com <unknown>
Fri, 8 Jan 2010 21:44:55 +0000 (21:44 +0000)
commitb52d0975be192c19eb353728d4fc8f1d02e542ff
tree7b960fb0419e4be7c4ad615667f11e26748ecfc4
parenta1caf8ef316aafbd2d75ce56ccfa85af8ac77f96
Control.Monad: +void :: f a -> f ()
See http://hackage.haskell.org/trac/ghc/ticket/3292
Turns m a -> m (). Lets one call functions for their side-effects without
having to get rid of their return values with '>> return ()'. Very useful
in many contexts (parsing, IO etc.); particularly good for 'forkIO' and 'forM_',
as they demand return types of 'IO ()' though most interesting IO functions
return non-().
Control/Monad.hs