rune 0.14.1

The Rune Language, an embeddable dynamic programming language for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn do_thing(op) {
    op(1, 2)
}

fn add(a, b) {
    a + b
}

fn sub(a, b) {
    a - b
}

#[test]
fn test_function_pointer() {
    assert_eq!(do_thing(add), 3);
    assert_eq!(do_thing(sub), -1);
}