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.0.0.5 tracks/scheme/exercises/rna-transcription/example.scm
trackler-2.0.0.4 tracks/scheme/exercises/rna-transcription/example.scm
trackler-2.0.0.3 tracks/scheme/exercises/rna-transcription/example.scm
trackler-2.0.0.2 tracks/scheme/exercises/rna-transcription/example.scm
trackler-2.0.0.1 tracks/scheme/exercises/rna-transcription/example.scm
trackler-2.0.0.0 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.4.1 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.4.0 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.3.0 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.2.1 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.2.0 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.1.2 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.1.1 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.1.0 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.0.1 tracks/scheme/exercises/rna-transcription/example.scm
trackler-1.0.0 tracks/scheme/rna-transcription/example.scm