Skip to content

Instantly share code, notes, and snippets.

@NicolaiNebel
Created March 22, 2017 10:43
Show Gist options
  • Save NicolaiNebel/3054113f55d4d29609676ada6e0e6871 to your computer and use it in GitHub Desktop.
Save NicolaiNebel/3054113f55d4d29609676ada6e0e6871 to your computer and use it in GitHub Desktop.
module v where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Vec (A : Set) : Nat -> Set where
[] : Vec A zero
_::_ : {n : Nat} -> A -> Vec A n -> Vec A (suc n)
infixl 90 _$_
_$_ : {n : Nat}{A B : Set} -> Vec (A -> B) n -> Vec A n -> Vec B n
[] $ [] = []
(f :: fs) $ (x :: xs) = f x :: (fs $ xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment