mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 10:41:59 +03:00
7 lines
179 B
Idris
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])
|