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 / task07 / reference.om
| 1 | fn bitrev_u16 x uint to uint |
| 2 | r = uint 0 |
| 3 | v = x |
| 4 | for i ulong 16 |
| 5 | r = or (shl r 1) (and v 1) |
| 6 | v = shr v 1 |
| 7 | end |
| 8 | ret r |
| 9 | end |