about summary refs log tree commit diff
path: root/examples/8.src
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-19 16:04:08 +0100
committerBaitinq <[email protected]>2025-01-19 16:43:59 +0100
commitf076be1254aa2934402837f44d0271d279ae74c9 (patch)
treee6b3f445aa8578b2bcaa5de2d2d91214755230b9 /examples/8.src
parentFeature: Add support for boolean values (diff)
downloadpry-lang-f076be1254aa2934402837f44d0271d279ae74c9.tar.gz
pry-lang-f076be1254aa2934402837f44d0271d279ae74c9.tar.bz2
pry-lang-f076be1254aa2934402837f44d0271d279ae74c9.zip
Feature: Add basic support for equality expression
Diffstat (limited to 'examples/8.src')
-rw-r--r--examples/8.src4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/8.src b/examples/8.src
index 1ec46e4..33323f7 100644
--- a/examples/8.src
+++ b/examples/8.src
@@ -1,8 +1,8 @@
 let fib = (n) => {
-	if n {
+	if n == 0 {
 		return 0;
 	};
-	if n - 1 {
+	if n == 1 {
 		return 1;
 	};
 	return fib(n-2) + fib(n-1);