Skip to content

Instantly share code, notes, and snippets.

@sjakobi
Created January 12, 2014 05:14
Show Gist options
  • Save sjakobi/8381206 to your computer and use it in GitHub Desktop.
Save sjakobi/8381206 to your computer and use it in GitHub Desktop.
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
zipWith' :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith' _ [] _ = []
zipWith' _ _ [] = []
zipWith' f (x:xs) (y:ys) = f x y : zipWith' f xs ys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment