3 ms·
Did anyone notice the fib function on the first page? It doesn't terminate: fib :: Nat->Nat fib 0 = 0 fib 1 = 1 fib (n+2) = fib (n+1) + fib (n+2) The last
by pmcjones 3y ago
Did anyone notice the fib function on the first page? It doesn't terminate:
fib :: Nat->Nat
fib 0 = 0
fib 1 = 1
fib (n+2) = fib (n+1) + fib (n+2)
The last line should be fib (n+2) = fib (n+1) + fib (n). The published version seems to have the same problem: https://pdfs.semanticscholar.org/82b4/ea72b89270c528006dd2532aef43eec463c3.pdf https://pdfs.semanticscholar.org/82b4/ea72b89270c528006dd253...