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
omega-mv / bench / inference_cost / tasks / task09 / reference.om
| 1 | fn factorial_u32 n uint to uint |
| 2 | if ge n 34 |
| 3 | ret 0 |
| 4 | end |
| 5 | res = uint 1 |
| 6 | count = ulong n |
| 7 | for i ulong count |
| 8 | res = mul res (uint add i 1) |
| 9 | end |
| 10 | ret res |
| 11 | end |