3 ms·
Perhaps you want the Haskell zipWith function? It takes two lists and, instead of zipping them together -- i.e., applying the tuple constructor (,) -- it lets y
by thestoicattack 15y ago
Perhaps you want the Haskell zipWith function? It takes two lists and, instead of zipping them together -- i.e., applying the tuple constructor (,) -- it lets you apply an arbitrary function.
I think from your python, you want the first element of A to be 0? (Python is not my best language.) Thus in Haskell,
a = 0 : zipWith (+) b c