Is there a way to access the previous iteration result/returned value in a loop?

Because, I am trying to build an expression rule which when supplied with two integer inputs (say 3 and 5), should return me {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15}}(An array of arrays).

If I pass 2 and 4, it should return me {{1,2},{3,4},{5,6},{7,8}}.

  Discussion posts and replies are publicly visible