mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-17 00:10:31 +03:00
10 lines
231 B
Idris
10 lines
231 B
Idris
|
%default partial
|
||
|
|
||
|
data Vect : Nat -> Type -> Type where
|
||
|
Nil : Vect Z a
|
||
|
(::) : a -> Vect k a -> Vect (S k) a
|
||
|
|
||
|
zip : Vect n a -> Vect n b -> Vect n (a, b)
|
||
|
zip [] [] impossible
|
||
|
zip (x :: xs) (y :: ys) = (x, y) :: zip xs ys
|