From cd844d7a00e1943710c9a23b372ddf67cac81649 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 11 Mar 2016 01:06:09 -0500 Subject: [PATCH] :fire: `zipDefaults`. --- src/Data/Functor/Both.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Data/Functor/Both.hs b/src/Data/Functor/Both.hs index 46f0d3caf..e10ca97b9 100644 --- a/src/Data/Functor/Both.hs +++ b/src/Data/Functor/Both.hs @@ -27,10 +27,6 @@ snd = Prelude.snd . runBoth zip :: Both [a] -> [Both a] zip = zipWith both --- | Zip Both lists, using the default values to extend the shorter list. -zipDefaults :: Both a -> Both [a] -> [Both a] -zipDefaults ds as = take (runBothWith max (length <$> as)) $ zipWith both ((++) <$> as <*> (repeat <$> ds)) - zipWith :: (a -> a -> b) -> Both [a] -> [b] zipWith _ (Both ([], _)) = [] zipWith _ (Both (_, [])) = []