1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Don’t bind variables we don’t use.

This commit is contained in:
Rob Rix 2016-02-29 09:33:02 -05:00
parent 0628793ab4
commit acd19b4502

View File

@ -14,8 +14,8 @@ zip :: Both [a] -> [Both a]
zip = zipWith both zip = zipWith both
zipWith :: (a -> a -> b) -> Both [a] -> [b] zipWith :: (a -> a -> b) -> Both [a] -> [b]
zipWith f (Both ([], _)) = [] zipWith _ (Both ([], _)) = []
zipWith f (Both (_, [])) = [] zipWith _ (Both (_, [])) = []
zipWith f (Both (a : as, b : bs)) = f a b : zipWith f (both as bs) zipWith f (Both (a : as, b : bs)) = f a b : zipWith f (both as bs)
unzip :: [Both a] -> Both [a] unzip :: [Both a] -> Both [a]