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 / rna-transcription / .meta / example.om

26 lines · 603 bytes Raw Blame History
1note Exercism-style exercise "rna-transcription": https://exercism.org/tracks/python/exercises/rna-transcription
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note torna writes the RNA complement of DNA strand dna into o (G to C, C to G, T to A, A to U)
4note and returns its length.
5note Check it with: sh exercise.sh exercises/rna-transcription
6om2
7fn torna dna view uchar * o edit uchar * to ulong
8for i ulong len dna
9c = get dna i
10r = uchar 0
11if eq c 71
12r = uchar 67
13end
14if eq c 67
15r = uchar 71
16end
17if eq c 84
18r = uchar 65
19end
20if eq c 65
21r = uchar 85
22end
23put o i r
24end
25ret len dna
26end