I have the following expression:
(Join[#, Reverse[#, {2}]] &@Partition[#, 2, 1, 1]) & /@ Vec
(* where: *)
Vec={{2,0},{1,1},{0,2}},
but I am not sure how this expression works. I tried
Partition[#, 2, 1, 1]) & /@ Vec,{0,2}}
and
Partition[Vec, 2, 1, 1])
but they gave me different results. I am not sure what # in the Join[]
stands for (Partition[]
or Vec).
In general, what is the logic behind this expression?