Based on the example you gave in the comments, this is exactly what reverse
does given a collection that contains collections. You want reverse
.
Flipping elements in Clojure
-
19-09-2022 - |
Question
If I input a vector and wanted to flip the elements' order, I'd write
(reverse [1 2 3])
Now, how would I generalize this idea to be able to input nested vectors and flip the order of elements? Given a matrix A the function should reverse the elements in each column.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow