Skip to content
  • gwern's avatar
    Control.Monad: +void :: f a -> f () · a8d9dc14
    gwern authored
    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-().
    a8d9dc14