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 / seed / qualification / om2 / sec / s3s4 / inline-rec-mutual-plain.om

21 lines · 513 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Control for inline-rec-mutual.om with every inline removed: accepted, runs (section 4 line 97).
3note Contract section 4 line 94: an inline function must not be recursive (error 9). f and g are both
4note inline and call each other. Without inline (inline-rec-mutual-plain.om) it runs and prints 55.
5om2
6fn f n ulong to ulong
7if eq n 0
8ret 0
9end
10ret add n g sub n 1
11end
12fn g n ulong to ulong
13if eq n 0
14ret 0
15end
16ret add n f sub n 1
17end
18fn main to int
19pu f 10
20ret 0
21end