summaryrefslogtreecommitdiff
path: root/tests/fib.ur
blob: 9d7fd340928cc96fa7a7f38c7548734615f1ffa6 (plain)
1
2
3
4
5
6
7
8
9
10
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>