Idris - map an operation on a n-dimensional vector
问题 I defined n-dimensional vectors in Idris as follows: import Data.Vect NDVect : (Num t) => (rank : Nat) -> (shape : Vect rank Nat) -> (t : Type) -> Type NDVect Z [] t = t NDVect (S n) (x::xs) t = Vect x (NDVect n xs t) Then I defined the following function which maps a function f to every entry in the tensor. iterateT : (f : t -> t') -> (v : NDVect r s t) -> NDVect r s t' iterateT {r = Z} {s = []} f v = f v iterateT {r = S n} {s = x::xs} f v = map (iterateT f) v But when I try to call