Velo by Example: Let Bindings

The let construct creates scoped local variables, keeping the surrounding scope clean.

let declares a variable that is only visible inside the block.

let(any result = calculate()) {
    term.println(result.str);
};
# result is not accessible here

This is useful for binding intermediate results.

let(any res = fib(15)) {
    term.println(res.str);
};