rpn_calc_karin

Crates.iorpn_calc_karin
lib.rsrpn_calc_karin
version0.1.1
sourcesrc
created_at2022-12-27 08:33:49.657557
updated_at2022-12-27 08:33:49.657557
descriptionRPN(Reverse Polish Notatio) library
homepagehttps://github.com/kujirahand/book-rust/tree/main/src/ch4/rpn_calc/README.md
repository
max_upload_size
id746107
size3,750
(mizunomisugi)

documentation

README

RPN(Reverse Polish Notation) Calc

Reverse Polish notation (RPN) Calc.

Example

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
}
Commit count: 0

cargo fmt