2 added 179 characters in body edited Feb 6 '18 at 16:39 Chris Degnen 22.6k22 gold badges3838 silver badges8989 bronze badges list1[a_] := List[ {(w + a), -d}, {-a, -d}, {-(w + a), -(t + d)}, {-a, -(t + d)}, {-a, -d}, {(w - a), -d}, {-a, -(t + d)}, {(w - a), -(t + d)}] list2[a_] := List[] For[i = 1, i <= 8, i++, list2[a_] := Evaluate[Append[ DownValues[list2][[1, 2]], list1[a][[i]]]]] list2[1]  {{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}} list1[1] == list2[1]  True As an alternative to a For loop Array can be used here, e.g. Array[(list2[a_] := Evaluate[Append[ DownValues[list2][[1, 2]], list1[a][[#]]]]) &, 8];  list1[a_] := List[ {(w + a), -d}, {-a, -d}, {-(w + a), -(t + d)}, {-a, -(t + d)}, {-a, -d}, {(w - a), -d}, {-a, -(t + d)}, {(w - a), -(t + d)}] list2[a_] := List[] For[i = 1, i <= 8, i++, list2[a_] := Evaluate[Append[ DownValues[list2][[1, 2]], list1[a][[i]]]]] list2[1]  {{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}} list1[1] == list2[1]  True list1[a_] := List[ {(w + a), -d}, {-a, -d}, {-(w + a), -(t + d)}, {-a, -(t + d)}, {-a, -d}, {(w - a), -d}, {-a, -(t + d)}, {(w - a), -(t + d)}] list2[a_] := List[] For[i = 1, i <= 8, i++, list2[a_] := Evaluate[Append[ DownValues[list2][[1, 2]], list1[a][[i]]]]] list2[1]  {{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}} list1[1] == list2[1]  True As an alternative to a For loop Array can be used here, e.g. Array[(list2[a_] := Evaluate[Append[ DownValues[list2][[1, 2]], list1[a][[#]]]]) &, 8];  1 answered Nov 8 '17 at 13:27 Chris Degnen 22.6k22 gold badges3838 silver badges8989 bronze badges list1[a_] := List[ {(w + a), -d}, {-a, -d}, {-(w + a), -(t + d)}, {-a, -(t + d)}, {-a, -d}, {(w - a), -d}, {-a, -(t + d)}, {(w - a), -(t + d)}] list2[a_] := List[] For[i = 1, i <= 8, i++, list2[a_] := Evaluate[Append[ DownValues[list2][[1, 2]], list1[a][[i]]]]] list2[1]  {{1 + w, -d}, {-1, -d}, {-1 - w, -d - t}, {-1, -d - t}, {-1, -d}, {-1 + w, -d}, {-1, -d - t}, {-1 + w, -d - t}} list1[1] == list2[1]  True