1
0
forked from GitHub/gf-core

Changed test.tr to run a fibNat test.

This commit is contained in:
bringert
2005-12-05 16:52:56 +00:00
parent 7c24fcb38f
commit 56e9e45171
2 changed files with 5 additions and 5 deletions

View File

@@ -9,4 +9,4 @@ fib n = fib (n-1) + fib (n-2)
fibNat : Nat -> Nat
fibNat Zero = Succ Zero
fibNat (Succ Zero) = Succ Zero
fibNat (Succ (Succ n)) = plus (fibNat (Succ n)) (fibNat n)
fibNat (Succ (Succ n)) = plus Nat add_Nat (fibNat (Succ n)) (fibNat n)

View File

@@ -1,4 +1,4 @@
main = let x : Type = case n of
n2 -> 2
n3 -> 3
in f Numeral
import nat
import fib
main = natToInt (fibNat (intToNat 10))