Given these two lists:
l1 = ['a', 'b', 'c']
l2 = ["Foo", "bar", "baz"]
For each item in l1, I want to run a func with each item in l2
something like:
Enum.each(l1, &(fun1(&1, < each_item_in_l2 >)
Is there a short way of doing that?
-
Read about comprehensions -> elixir-lang.org/getting-started/comprehensions.html, it may help.NoDisplayName– NoDisplayName2017-07-30 07:37:59 +00:00Commented Jul 30, 2017 at 7:37
Add a comment
|