praxis-cli 0.2.0

The `praxis` command-line tool: run, check and debug Praxis programs.
1
2
3
4
5
6
7
8
9
10
11
// The destination of a *faulting* instruction (REP-72). `values[start + 2]`
// reads past the end: the wrapper sets `pending_fault` and returns the Unit
// sentinel, so the temp it writes into is the one temp in this frame whose
// value was never produced. It has to say so, exactly like the sum below it.
var numbers = [12, 7, 41]

fn window_sum(values, start) {
    values[start] + values[start + 1] + values[start + 2]
}

out(window_sum(numbers, 1))