title: Outputting a list in Haskell without the brackets, and over a range?
body: <p>I have a function that returns a list, call it <code>f n</code>.</p>
  
  <p>If I print the list, it looks like <code>[1,2,3,4]</code> whereas I want it to look like <code>1 2 3 4</code>.</p>
  
  <p>Also I want to output many lists over a range of <code>n</code>, so <code>f 1</code> on the first line, <code>f 2</code> on the second line, ... <code>f n</code> on the nth line.</p>
  
  <p>I have my <code>f n</code> function working but cannot get the output to work for the life of me.</p>
  
  <p>Current attempt:</p>
  
  <pre><code>main = do
      n &lt;- readLn :: IO Int
      mapM_ putStrLn [f i | i &lt;- [1..n]]
  </code></pre>