From 2dde64461adda6e34ac5e329c19b2c2023aa1308 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 30 Dec 2024 16:03:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit semver: chore --- src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index b6ece53..3c7319f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,14 +15,12 @@ pub mod lexer; pub mod parser; const INPUT: &str = " -fn add(left ~ int, right ~ int) -> fn(int, int) -> int { - left + right -} +fn fib(n ~ int) -> int { + if n < 2 { + return n; + }; -fn main() { - let a = 1; - let b = 2; - let c = add(a, b); + return fib(n - 1) + fib(n - 2); } ";