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.55 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.54 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.53 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.52 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.51 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.50 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.49 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.48 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.47 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.46 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.45 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.44 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.43 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.42 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.41 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.40 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.39 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.38 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.37 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon
trackler-2.2.1.36 tracks/ceylon/exercises/rna-transcription/example/RNA.ceylon