1
0
forked from GitHub/gf-core

Move transfer into the GF repo.

This commit is contained in:
bringert
2005-11-25 16:36:19 +00:00
parent fe2731e5f8
commit dbe8e61acc
42 changed files with 7400 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import nat ;
data Array : Type -> Nat -> Type where {
Empty : (A:Type) -> Array A Zero ;
Cell : (A:Type) -> (n:Nat) -> A -> Array A n -> Array A (Succ n) ;
} ;
mapA : (A:Type) -> (B:Type) -> (n:Nat) -> (A -> B) -> Array A n -> Array B n ;
mapA A B _ f (Empty _) = Empty B ;
mapA A B (Succ n) f (Cell _ _ x xs) = Cell B n (f x) (mapA A B n f xs) ;