mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 03:15:26 -07:00
operations in the abstract syntax
This commit is contained in:
1 parent
b46442ab0b
commit
115b4213d5
16 files changed
+96
-62
No files matched your search
@@ -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