mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
11 lines
198 B
Plaintext
11 lines
198 B
Plaintext
fun fib (n: int): int = do
|
|
case n of
|
|
| 1 -> return 1
|
|
| 2 -> return 1
|
|
| else -> return fib(n - 1) + fib(n - 2)
|
|
end
|
|
end
|
|
|
|
fun main: void = do
|
|
fib(5) |> @write(_)
|
|
end |