mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Progress on updating entire compiler for snake_case
This commit is contained in:
parent
db6cc5a7b1
commit
b56fbd38e1
297 changed files with 8416 additions and 8544 deletions
|
@ -1,10 +1,10 @@
|
|||
app [main] { pf: platform "fibonacci-platform/main.roc" }
|
||||
|
||||
main = \n -> fib n 0 1
|
||||
main = \n -> fib(n, 0, 1)
|
||||
|
||||
# the clever implementation requires join points
|
||||
fib = \n, a, b ->
|
||||
if n == 0 then
|
||||
a
|
||||
else
|
||||
fib (n - 1) b (a + b)
|
||||
fib((n - 1), b, (a + b))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue