Idris2/tests/idris2/import002/Nat.idr

10 lines
128 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)