Sha256: 3a12ca258ab90f53a94365bdfcdc28b454c36bddd34b38def087c82788890261

Contents?: true

Size: 409 Bytes

Versions: 22

Compression:

Stored size: 409 Bytes

Contents

class Complement {
  private def dnaMap = ["G":"C","C":"G","T":"A","A":"U"]
  private def rnaMap = ["C":"G","G":"C","A":"T","U":"A"]

  private def transcribe(seq, seqMap) {
    def result = new String()
    seq.split('').each() {
      result += seqMap[it] 
    }
    return result
  }

  def ofDNA(strand) {
    transcribe(strand, dnaMap)   
  }

  def ofRNA(strand) {
    transcribe(strand, rnaMap) 
  }
}

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
trackler-2.0.1.0 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.10 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.9 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.8 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.7 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.6 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.5 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.4 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.3 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.2 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.1 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-2.0.0.0 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.4.1 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.4.0 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.3.0 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.2.1 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.2.0 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.1.2 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.1.1 tracks/groovy/exercises/rna-transcription/Example.groovy
trackler-1.0.1.0 tracks/groovy/exercises/rna-transcription/Example.groovy