1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 01:52:11 +03:00
juvix/tests/positive/Termination/Ack.juvix
2023-07-11 17:22:07 +02:00

10 lines
175 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Ack;
import Data.Nat;
open Data.Nat;
ack :
| zero n := suc n
| (suc m) zero := ack m (suc zero)
| (suc m) (suc n) := ack m (ack (suc m) n);