view tests/fib.ur @ 2298:6e580e319077

Fix condition for installing new cache entries
author Adam Chlipala <adam@chlipala.net>
date Thu, 19 Nov 2015 16:02:04 -0500
parents
children
line wrap: on
line source
fun fib n =
    if n = 0 then
        0
    else if n = 1 then
        1
    else
        fib (n - 1) + fib (n - 2)

fun main n : transaction page =
    return <xml>{[fib n]}</xml>