2

I am having trouble with transposing a matrix. I can transpose, but with three helper functions, which is not really efficient. I found some answers using apply. But are there any other ways to transpose without using it?

(check-expect (transpose (list (list 1 2 3)
                               (list 4 5 6)))
              (list (list 1 4)
                    (list 2 5)
                    (list 3 6)))

lambda, local, map, foldl and foldr and other built-in functions in student language are fine.

Thanks.

Rex
  • 71
  • 7

0 Answers0