Say I have:
(def s1 [1 2 3 4 5])
(def s2 [1 2 3 4 5])
For every x
in s1
, I want to multiply it with every y
in s2
.
To clarify, I basically want the Cartesian product, so I don't think map
works here.
(for [x1 s1
x2 s2]
(* x1 x2))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With