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:
parent
cf8d218b11
commit
7c4074113f
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue