mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2026-02-04 18:40:19 +00:00
If Statement Support
This commit is contained in:
8
examples/fib.pork
Normal file
8
examples/fib.pork
Normal file
@@ -0,0 +1,8 @@
|
||||
fib = { n in
|
||||
if n == 0
|
||||
then 0
|
||||
else if n == 1
|
||||
then 1
|
||||
else fib(n - 1) + fib(n - 2)
|
||||
}
|
||||
main = { in fib(20) }
|
||||
Reference in New Issue
Block a user