Crates.io | laplade |
lib.rs | laplade |
version | 0.1.2 |
source | src |
created_at | 2023-02-02 23:51:47.927715 |
updated_at | 2023-02-03 00:11:51.450457 |
description | RPN(Reverse Polish Notatio) library |
homepage | https://github.com/Laplade/laplade/tree/master/cargo |
repository | |
max_upload_size | |
id | 775261 |
size | 3,764 |
Reverse Polish notation (RPN) Calc.
fn main() {
let src = String::from("1 2 + 3 * ");
let a = rpn_calc::eval(src).unwrap();
println!("{}", a); // →9
}
fn main() {
let result = rpn_calc::eval_str("1 2 3 * +");
println!("{}", result); // →7
}