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 / si / rosetta / exercises / all-your-base / all-your-base.om

11 lines · 613 bytes Raw Blame History
1note Exercism-style exercise "all-your-base": https://exercism.org/tracks/python/exercises/all-your-base
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note rebase converts the number whose digits ds are in base ib (most significant first) to base ob,
4note writes its digits into o and returns how many (the number 0 is the single digit 0); or -1 when
5note ib < 2, -3 when ob < 2, -2 when a digit is outside 0 .. ib-1.
6note Check it with: sh exercise.sh exercises/all-your-base
7om2
8fn rebase ib long ds view long * ob long o edit long * to long
9note replace this line with your solution
10trap 13
11end