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 / si / rosetta / exercises / collatz-conjecture / collatz-conjecture.om
| 1 | note Exercism-style exercise "collatz-conjecture": https://exercism.org/tracks/python/exercises/collatz-conjecture |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | note Return how many steps n takes to reach 1 (n even: n / 2, n odd: 3n + 1). steps 1 is 0. |
| 4 | note Check it with: sh exercise.sh exercises/collatz-conjecture |
| 5 | om2 |
| 6 | fn steps n ulong to ulong |
| 7 | note replace this line with your solution |
| 8 | trap 13 |
| 9 | end |