interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / tests / one_layer / generalization / dev / tasks / cases / devgen07 / hidden / reference.osc

13 lines · 330 bytes Raw Blame History
1fn max_rise4(a: i32, b: i32, c: i32, d: i32) -> i64 {
2 let v: own [i64; 4] = alloc(0);
3 v[0] = a as i64;
4 v[1] = b as i64;
5 v[2] = c as i64;
6 v[3] = d as i64;
7 let mut best: i64 = v[1] - v[0];
8 for i in 1 .. 3 {
9 let r: i64 = v[i + 1] - v[i];
10 if r > best { best = r; }
11 }
12 return best;
13}