Sha256: d6eef3599da725f1c3b2477578a762298327a3e1b19fbd01031c3730ca1360dc

Contents?: true

Size: 444 Bytes

Versions: 63

Compression:

Stored size: 444 Bytes

Contents

class Error() {}

String|Error transcription(String dna) {
    return dna.fold("" of String|Error)((String|Error r, Character c) =>
            if (is Error r)
            then r
            else (switch (c)
                        case ('G') r + "C"
                        case ('C') r + "G"
                        case ('T') r + "A"
                        case ('A') r + "U"
                        else Error()
                )
    );
}

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.179 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.178 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.177 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.176 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.175 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.174 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.173 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.172 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.171 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.170 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.169 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.167 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.166 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.165 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.164 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.163 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.162 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.161 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.160 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon