From 7c4074113f4461855364762b0f029c05074c13f2 Mon Sep 17 00:00:00 2001 From: electria Date: Thu, 16 Jul 2026 11:00:15 -0700 Subject: [PATCH] feat: shorthand to concatonate arguments in the shell this allows for `tylc 1 + 1`, making it equivelent to `tylc "1+1"` this makes implementing other arguments difficult/impossible, though --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index eeaba03..e0ed1f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ pub fn parse_and_calc(s: &str) -> Float { } fn main() { - let input = match env::args().nth(1) { + let input = match env::args().skip(1).reduce(|x, a| a + &x) { Some(s) => s, None => { let mut buf = String::new();