2021-01-16 10:03:45 +03:00
|
|
|
data Vect : Nat -> Type -> Type where
|
|
|
|
Nil : Vect Z a
|
|
|
|
(::) : a -> (1 xs : Vect k a) -> Vect (S k) a
|
|
|
|
|
2020-05-25 15:14:51 +03:00
|
|
|
partial
|
2021-01-16 10:03:45 +03:00
|
|
|
append : (1 _ : Vect n a) -> Vect m a -> Vect (n + m) a
|
|
|
|
append (x :: zs@(y :: ws)) ys = ?foo -- zs usable, y+ws not
|
|
|
|
|
|
|
|
cappend : (1 _ : Vect n a) -> Vect m a -> Vect (plus n m) $a
|
|
|
|
cappend xs ys
|
|
|
|
= case xs of
|
|
|
|
Nil => ys
|
|
|
|
x :: zs => ?bar -- zs usable, xs not
|
|
|
|
|
|
|
|
cappend2 : (1 _ : Vect n a) -> Vect m a -> Vect (plus n m) a
|
|
|
|
cappend2 xs ys
|
|
|
|
= case xs of
|
|
|
|
Nil => ys
|
|
|
|
x :: zs => let ts = zs in ?baz -- ts usable, xs+zs not
|