mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
Moved transfer libraries to transfer/lib
This commit is contained in:
9
transfer/lib/array.tr
Normal file
9
transfer/lib/array.tr
Normal file
@@ -0,0 +1,9 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user