Sometimes it is more straightforward to traverse a data structure if you would transpose it first, i.e. instead of working on an m by n matrix you would work on the corresponding n by m matrix instead.
Let’s look at a common use case in AC: timeseries data.
By default the function ts() will return timeseries as shown here:
You will notice that the first row contains all the dates, the second all the times and then the third contains all the prices.
If you wanted to loop over all timeseries records in a for-loop or apply a function to each record using map, you would want to use the function transpose first:
Now each row contains a record: date, time and price together. And this might be easier to process. Or in many cases, at least easier to reason about.