Is there a better way to write these two nested loops in Erlang? Since one month, I'm learning Erlang and I like it so much.
Today, I wrote an algorithm to solve a problem.
Some time ago, I used two nested for loops in C# to solve it but, solving the same problem in Erlang, I asked myself if there is a better way to write something similar to the two nested for loops I used before.

Let's say that the two nested for loops in C# are:

for(int i = 100; i&lt;=999;i++)
    {
        for(int j = 100;j&lt;=999;j++)
        {
            int prod = i*j;
              //some logic here..
        }
    }


and the respective code in Erlang is the following:

loopINumber(_,LowerLim,UpperLim,Product) when LowerLim &gt; UpperLim -&gt; {Product};

loopINumber(ILimit,LowerLim,UpperLim,Product) -&gt;
    Product = loopJNumber(ILimit,UpperLim,LowerLim,Product),
    loopINumber(ILimit,LowerLim+1,UpperLim,Product).

loopJNumber(LowerLim,UpperLim,_,Product) when LowerLim &gt; UpperLim -&gt; Product;

loopJNumber(LowerLim,UpperLim,ILimit,Product) -&gt;
    Product = ILimit * LowerLim,
    %% some logic here..
    loopJNumber(LowerLim+1,UpperLim,ILimit,Product).

start(ILimit,JLimit) -&gt; loopINumber(ILimit,ILimit,JLimit,0).


I know that maybe there's something to improve. Being still a beginner in functional languages, most probably I'm still coding in a "sequential" or OOP way. How can I improve this Erlang code?
In general, nested for loops translate well to list comprehensions:

Prods = [I*J || I &lt;- lists:seq(100,999), J &lt;- lists:seq(100,999)]
// Generates a list of products to perform further logic on