diff options
Diffstat (limited to 'entries')
-rw-r--r-- | entries/funemy/.gitignore | 1 | ||||
-rw-r--r-- | entries/funemy/koka/fib.kk | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/entries/funemy/.gitignore b/entries/funemy/.gitignore index acb903a..3d2fbd5 100644 --- a/entries/funemy/.gitignore +++ b/entries/funemy/.gitignore @@ -1,3 +1,4 @@ .DS_Store *.agdai *.smt2 +**/.koka/* diff --git a/entries/funemy/koka/fib.kk b/entries/funemy/koka/fib.kk new file mode 100644 index 0000000..5b7e66b --- /dev/null +++ b/entries/funemy/koka/fib.kk @@ -0,0 +1,12 @@ +effect fib + ctl fib(n : int) : int + +fun doFib(inp : int) : div int + with ctl fib(n) + if n == 0 then 0 + else if n == 1 then 1 + else (doFib(n - 1) : int) + doFib(n - 2) + fib(inp) + +fun main() + print(doFib(20)) |