<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05/10/2014 05:53 PM, Roelof Wobben
      wrote:<br>
    </div>
    <blockquote cite="mid:536E4B5E.4020608@home.nl" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Thanks , it's working now like this :
        <br>
        <br>
        loop :: Int -> IO ()<br>
        loop n = do<br>
            if n <= 100 <br>
            then do<br>
                putStrLn (show n );<br>
                putChar ' ';<br>
                putStrLn (show (n * n )) ;<br>
                loop (n + 1);<br>
            else<br>
               return () ;<br>
        <br>
        main :: IO ()<br>
        main = loop 1<br>
        <br>
        But the outcome looks like this: <br>
        <br>
        1 <br>
           1<br>
        2 <br>
           4 <br>
        <br>
        Can I somehow make it like this  <br>
        <br>
        1   1<br>
        2    4<br>
        3    9 <br>
        <br>
        Roelof</div>
      <br>
    </blockquote>
    Take a look at the `putStr' function. It omits the newline character
    that putStrLn writes at the end of the string.<br>
    <br>
    Jochem<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jochem Berndsen | <a class="moz-txt-link-abbreviated" href="mailto:jochem@functor.nl">jochem@functor.nl</a></pre>
  </body>
</html>