Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TangerineCat/c054f23ce711c1eb56dbe9e97583c6a3 to your computer and use it in GitHub Desktop.
Save TangerineCat/c054f23ce711c1eb56dbe9e97583c6a3 to your computer and use it in GitHub Desktop.
map3 :: (a->b->c->d) -> [a] -> [b] -> [c] -> [d]
map3 _ [] _ _ = []
map3 _ _ [] _ = []
map3 _ _ _ [] = [] -- Is there a better way to do this? ¯\_(ツ)_/¯
map3 f (x:xs) (y:ys) (z:zs) = f x y z : map2 f xs ys zs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment