Quote Originally Posted by erotavlas View Post
I think that it realizes the behaviour of nested loops.
Code:
Example:
For x For y For z -> variablesVector[x,y,z]
Domain for each variable -> Data
for x in subset(Data)
   for y in subset(Data)
      for z in subset (Data)
        do (x,y,z)
Not exactly, since what you've shown uses the same domain for each variable. IOW, 'Data' is the domain for all variables, not for each variable.
Quote Originally Posted by erotavlas View Post
Do you have a suggestions about how can I do to reduce the complexity of huge number of recursive calls?
What do you mean with "complex"? The design suggested by JohnW is probably the least complex, since all the iteration logic is encapsulated and separate from the logic in the inner loop's body.