Sha256: 2c9c5ff12f8627ec3b79aa5fad40d06214dbf1e18b2ad965b52987b525b77054

Contents?: true

Size: 748 Bytes

Versions: 85

Compression:

Stored size: 748 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

85 entries across 85 versions & 1 rubygems

Version Path
trackler-2.2.1.116 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.115 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.114 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.113 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.111 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.110 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.109 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.108 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.107 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.106 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.105 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.104 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.103 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.102 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.101 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.100 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.99 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.98 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.97 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.96 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon