Always good old until
f = until test func where test ((a, b), _) = a * 10 < b func (p, s) = (ratio p s+2, s+2)
To be fair, you really will always have some kind of recursion, it's just a matter of how distracting you are. Haskell has no "loop".
As for your second question, I believe that you just asked: "How do I call a function call without doing a recursion." In short, since then you cannot define recursion.
However, with higher order functions such as until iterate and fix (look at the implementation of this), you can avoid having to name your working function. They take care of explicit recursion under the covers.
source share