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
This commit is contained in:
electria 2026-07-16 11:00:15 -07:00
commit 7c4074113f
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -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();