Idris2/tests/idris2/import002/Nat.idr

11 lines
129 B
Idris
Raw Normal View History

module Nat
public export
data Nat = Z | S Nat
public export
plus : Nat -> Nat -> Nat
plus Z y = y
plus (S k) y = S (plus k y)