Skip to main content

rule - How to apply # on different lists?



If I have


list1 = {1, 2, 3, 4}
list2 = {5, 6, 7, 8}

How can I do so, that



function[#1, #2]

takes #1 from list1 and #2 from list2??



Answer



MapThread[function[#1, #2] &, {list1, list2}]

Comments