title: How can I print 2 elements with putStr Haskell?
body: <p>I'm new to Haskell and I am wondering how can I print the results of two functions in Haskell, something I would do in c++ like: </p>
  
  <pre><code>cout &lt;&lt; f() &lt;&lt; g();
  </code></pre>
  
  <p>Or in c#:</p>
  
  <pre><code>Console.WriteLine(f() + " " + g());
  </code></pre>
  
  <p>In Haskell I tried something like</p>
  
  <pre><code>main =
      --putStr ( show $ square 3 )
      putStr ( show $ fibSeries 12 ) 
  
  square :: Int -&gt; Int
  square x = x * x
  
  fib :: Int -&gt; Int
  fib 0 = 0
  fib 1 = 1
  fib n = fib (n - 1) + fib (n - 2)
  
  fibSeries :: Int -&gt; [Int]
  fibSeries x = map fib [0..x]
  </code></pre>
  
  <p>but I had to comment the first command because it has given me a compile-time error.  </p>
  
  <p>The error is:</p>
  
  <pre><code>src\Main.hs:21:5:
      Couldn't match expected type `(String -&gt; IO ()) -&gt; String -&gt; t0'
                  with actual type `IO ()'
      The function `putStr' is applied to three arguments,
      but its type `String -&gt; IO ()' has only one
      In the expression:
        putStr (show $ square 3) putStr (show $ fibSeries 12)
      In an equation for `main':
          main = putStr (show $ square 3) putStr (show $ fibSeries 12)
  </code></pre>