Transposing a matrix


/ Published in: Clojure
Save to your folder(s)



Copy this code and paste it in your HTML
  1. a
  2. > [[1 4 7]
  3. > [2 5 8]
  4. > [3 6 9]]
  5.  
  6. user=> (vec (apply map vector a))
  7. [[1 4 7] [2 5 8] [3 6 9]]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.