rpn(1): fixed expressions on one line
This commit is contained in:
parent
fb2a164507
commit
6f98fdd1d4
|
@ -138,6 +138,7 @@ fn eval(
|
||||||
// Split the input into tokens.
|
// Split the input into tokens.
|
||||||
let mut toks: VecDeque<CalcType> = input
|
let mut toks: VecDeque<CalcType> = input
|
||||||
.split(' ')
|
.split(' ')
|
||||||
|
.rev()
|
||||||
.map(|t| CalcType::from(t))
|
.map(|t| CalcType::from(t))
|
||||||
.collect();
|
.collect();
|
||||||
let mut ops: VecDeque<CalcType> = VecDeque::new();
|
let mut ops: VecDeque<CalcType> = VecDeque::new();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user