v input view map row map
Remap returns a view containing the rows of v in the order indicated by map, which must be a column of integers. The size of the result is the same as the number of entries in map.
Examples:set v [view A def {a b c}]
view $v remap {1 0 2}
view $v remap {1 2 2 1}
A 0 b 1 a 2 c
A 0 b 1 c 2 c 3 b