I would like to multiply two lists, all values to all.
list:seq(1, 100) * list:seq(1, 100)
Could you, please, help me to manage it?
What do you mean by multiply two lists?
L1 = L2 = lists:seq(1, 100),
[ X * Y || X <- L1, Y <- L2 ].
or
[ X * Y || {X, Y} <- lists:zip(L1, L2) ].
or
[ [ X * Y || Y <- L2 ] || X <- L1 ].
or
[ lists:duplicate(X, L2) || X <- L1 ].
or ... you name it.
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