Sha256: b82b8481dc46808741a4e79ed0b53245fcc7f97ad52499149506c2893106651e

Contents?: true

Size: 493 Bytes

Versions: 396

Compression:

Stored size: 493 Bytes

Contents

(define-module (dna)
  #:export (to-rna))

(define lookup
  '((#\C . #\G)
    (#\G . #\C)
    (#\A . #\U)
    (#\T . #\A)))

;; Example note: there's no explict guard to satisfy the
;; validation test, but the lookup in to-rna will raise
;; an error if the nucleotide is invalid (i.e., not in
;; the above alist), so the test passes.

(define to-rna
  (lambda (dna)
    (let ((dna-seq (string->list dna)))
      (apply string
             (map (lambda (c) (cdr (assoc c lookup))) dna-seq)))))

Version data entries

396 entries across 396 versions & 1 rubygems

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