Skip to content

Commit

Permalink
Update code in readme to curly braces syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tjammer committed Sep 2, 2024
1 parent ab8ef8b commit d397c0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ Fibonacci example
let number = 35

-- calculate fibonacci number
fun rec fib(n):
match n:
fun rec fib(n) {
match n {
0 | 1: n
_: fib(n - 1) + fib(n - 2)
}
}

-- and print it
fib(number).fmt().print()
Expand Down

0 comments on commit d397c0a

Please sign in to comment.