title: Haskell : Increment index in a loop
body: <p>I have a function that calculates f(n) in Haskell. 
  I have to write a loop so that it will start calculating values from f(0) to f(n), and will every time compare the value of f(i) with some fixed value. 
  I am an expert in OOP, hence I am finding it difficult to think in the functional way. 
  For example, I have to write something like</p>
  
  <pre><code>while (number &lt; f(i)) 
     i++
  </code></pre>
  
  <p>How would I write this in Haskell?</p>