This package contains both an executable and a library for Reverse Polish Notation (aka RPN) calculation.
In order to run a REPL to evaluate RPN expressions, just run cargo run
.
If you want to evaluate use the library, take a look at rpn::evaluate(expr: &str) -> Result<f32, &str>
:
extern crate rpn;
let result:f32 = rpn::evaluate("5 2 +").unwrap();
MIT