clojure - How do I multiply all elements in one collection with all the elements in another collection? -


say have:

(def s1 [1 2 3 4 5]) (def s2 [1 2 3 4 5]) 

for every x in s1, want multiply every y in s2.


to clarify, want cartesian product, don't think map works here.

(for [x1 s1       x2 s2]   (* x1 x2)) 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -