mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-07-05 05:12:45 -06:00
operations in the abstract syntax
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
abstract Nat = {
|
||||
|
||||
cat Nat ;
|
||||
data zero : Nat ;
|
||||
succ : Nat -> Nat ;
|
||||
|
||||
oper plus : Nat -> Nat -> Nat ;
|
||||
def plus zero y = y ;
|
||||
plus (succ x) y = succ (plus x y) ;
|
||||
|
||||
oper twice : Nat -> Nat = \x -> plus x x ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user