From 6f98fdd1d44a0d207556b040b0dd1e7980d956a3 Mon Sep 17 00:00:00 2001 From: emma Date: Fri, 2 Feb 2024 19:13:53 -0700 Subject: [PATCH] rpn(1): fixed expressions on one line --- src/rpn.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rpn.rs b/src/rpn.rs index 7cba297..e369c23 100644 --- a/src/rpn.rs +++ b/src/rpn.rs @@ -138,6 +138,7 @@ fn eval( // Split the input into tokens. let mut toks: VecDeque = input .split(' ') + .rev() .map(|t| CalcType::from(t)) .collect(); let mut ops: VecDeque = VecDeque::new();