hyoka 0.1.5

Generic REPL that can be configured to do pretty much anything you want.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate hyoka;

pub fn main() {
    let mut repl = hyoka::Repl::new("summation>", 0, |x: &mut i32, y: String| {
        let y = {
            let mut y = y;
            y.pop();
            y
        };
        let y = y
            .parse::<i32>()
            .expect(&format!("Cannot convert '{}' into an integer", y));
        *x += y;
        Some(format!("x:{}", x))
    });
    repl.run();
}