Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sjakobi
Created January 12, 2014 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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