How do I get Mathematica to thread a 2-variable function over two lists, using functional programmin
- by Leah Wrenn Berman
Lets say I have a function f[x_, y_], and two lists l1, l2. I'd like to evaluate f[x,y] where x runs over the list l1 and y runs over the list l2, and I'd like to do it without having to make all pairs of the form {l1[[i]],l2[[j]]}.
(Motivation: I'm trying to implement some basic Haskell programs in Mathematica. In particular, I'd like to be able…