# Recursive addition of vector list to last elements of vector lists

This question refers to an extension of Add list of vectors to list of vectors recursively . I tried hard to complete the problem but now I got stuck. I have vectors

lis0 = {u, v}
m = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};


Adding each component of m to lis0 gives me

lis1={{{u, v}, {1 + u, v}}, {{u, v}, {u, 1 + v}}, {{u, v}, {-1 + u, v}}, {{u, v}, {u, -1 + v}}}


Now I want to add each vector of m to each last component of lis1 resulting in 16 sublists

lis2={{{{u, v}, {1 + u, v}, {2 + u, v}}, {{u, v}, {1 + u, v}, {1 + u, 1 + v}},{{u, v}, {1 + u, v}, {u, v}}...


So now I want to continue adding m to each last element in lis2 and so on. Lists will grow exponentially in size. Here is my code so far:

lis1 = {u, v} + # & /@ m;
lis1 = List[lis0, #] & /@ lis1

x2 = Map[Function[z, z + # & /@ m], Last /@ lis1]


here x2 is part of next lis2

This seems a case for recursive programming. Call n then number of additions:

n = 2;
If [Length[Flatten[dat]] >= 8 n + 1, Return[dat]];
Switch[dat
, {{u, v}, ___}, add[ Append[dat, Last[dat] + #] & /@ m ] 3. If the structure of data is not {{u,v},..} we need to dig deeper, that is we need to apply add to the sub lists.