Source

xp.memo / code / Main.hs

Diff from to

code/Main.hs

 
 import Debug.Trace ( trace )
 
-main = print "Hello :) "
+import System.Vacuum.Ubigraph ( view )
 
+main = do putStrLn "--"
+          print (mfib' 30000)
+          putStrLn "--"
+          print (mfib' 30003)
+          
 memoTrace = C.untrie . (trace "Building trie" C.trie)
 
-sfib :: Integer -> Integer
-sfib = C.untrie fibtrie
-
-sfib' :: Integer -> Integer
-sfib' 0 = 0
-sfib' 1 = 1
-sfib' n = sfib (n-2) + sfib (n-1)
-
-
 mfib :: Integer -> Integer
 mfib = memoTrace mfib'