Previously in this section, we touched on the tailRecM method briefly. It is pretty useful in certain situations, because it allows you to define loops in the context of an effect type. In this subsection, let's take a more detailed look at its signature and at how this method works:
Let's take a look at the arguments of this method. First of all, let's take a look at the second argument of this method, the f function. The function takes a raw value of type A, and the result of this function is an effect type, which is F[Either[A, B]].
Let's think about what we can do with this computation to make a loop out of it. Suppose ...