Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 429 Bytes

File metadata and controls

17 lines (16 loc) · 429 Bytes

Interpreter and compiler for the Monkey programming language from Writing an Interpreter in Go and Writing a Compiler in Go by Thorsten Ball.

let fibonacci = fn(x) {
    if (x == 0) {
        return 0;
    } else {
        if (x == 1) {
            return 1;
        } else {
            fibonacci(x - 1) + fibonacci(x - 2);
        }
    }
};
fibonacci(15);