mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-13 06:49:31 -06:00
14 lines
224 B
Plaintext
14 lines
224 B
Plaintext
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 ;
|
|
|
|
}
|