title: What is the difference between mapM_ and mapM in Haskell?
body: <p>I've already checked Hoogle, <a href="http://hackage.haskell.org/package/base-4.7.0.1/docs/Prelude.html#v:mapM" rel="noreferrer">http://hackage.haskell.org/package/base-4.7.0.1/docs/Prelude.html#v:mapM</a>, which says that <code>mapM_</code> ignores the results.</p>
  
  <p>However, I still don't have idea how to use it properly.</p>
  
  <pre><code>main = mapM_ (putStrLn.show) [1,2]
  
  main = mapM (putStrLn.show) [1,2]
  
  main = map (putStrLn.show) [1,2]
  </code></pre>