title: Haskell - loop over user input
body: <p>I have a program in haskell that has to read arbitrary lines of input from the user and when the user is finished the accumulated input has to be sent to a function.</p>
  
  <p>In an imperative programming language this would look like this:</p>
  
  <pre><code>content = ''
  while True:
      line = readLine()
      if line == 'q':
          break
      content += line
  func(content)
  </code></pre>
  
  <p>I find this incredibly difficult to do in haskell so I would like to know if there's an haskell equivalent.</p>