Idris2/tests/idris2/perror021/Implicit.idr

7 lines
179 B
Idris

import Data.Vect
myReverse : Vect n el -> Vect n el
myReverse [] = []
myReverse {n = S k} (x :: xs) =
replace {p=\n => Vect n el} (plusCommutative k 1) (myReverse xs ++ [x])