Clojure – Combining Two vectors into a vector of vectors [duplicate]

You can use mapcat and an inner map like this:

user=> (mapcat (fn [as b] 
                 (mapv #(vector % b) as)) 
         [[1 2] [3 4]] [5 6])
([1 5] [2 5] [3 6] [4 6])

Browse More Popular Posts

Leave a Comment