on master help sign in
Rewrite Prelude.Vect.zip in terms of Prelude.Vect.zipWith
commit465acaf7fe4e7c5ed8018b41ac8d6bbd87bbaca4 authorMelvar Chen <Melvar.Chen@googlemail.com> dateThu 28 Feb 2013, 00:37 (14 years ago) parent9c77928
1 file changed+1−2
lib/Prelude/Vect.idr+1−2
lib/Prelude/Vect.idr+1−2
@@ -89,8 +89,7 @@ zipWith f [] [] = []
8989zipWith f (x::xs) (y::ys) = f x y :: zipWith f xs ys
9090
9191zip : Vect a n -> Vect b n -> Vect (a, b) n
92−zip [] [] = []
93−zip (x :: xs) (y :: ys) = (x, y) :: (zip xs ys)
92+zip = zipWith (\x => \y => (x,y))
9493
9594unzip : Vect (a, b) n -> (Vect a n, Vect b n)
9695unzip [] = ([], [])