on master help sign in
Rewrite Prelude.Vect.zip in terms of Prelude.Vect.zipWith
465acafMelvar Chen
lib/Prelude/Vect.idr+1−2
@@ -89,8 +89,7 @@ zipWith f [] [] = []
89zipWith f (x::xs) (y::ys) = f x y :: zipWith f xs ys
89zipWith f (x::xs) (y::ys) = f x y :: zipWith f xs ys
90
90
91zip : Vect a n -> Vect b n -> Vect (a, b) n
91zip : Vect a n -> Vect b n -> Vect (a, b) n
92−zip [] [] = []
92+zip = zipWith (\x => \y => (x,y))
93−zip (x :: xs) (y :: ys) = (x, y) :: (zip xs ys)
94
93
95unzip : Vect (a, b) n -> (Vect a n, Vect b n)
94unzip : Vect (a, b) n -> (Vect a n, Vect b n)
96unzip [] = ([], [])
95unzip [] = ([], [])