src/problems/dna.lisp @ 8de2e6d7c9d9

Inline utils into problem files, add PRTM
author Steve Losh <steve@stevelosh.com>
date Sat, 03 Nov 2018 17:02:03 -0400
parents 11df545d1a41
children e279056b1a5b
(in-package :rosalind)

(define-problem dna (data string)
    "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"
    "20 12 17 21"
  (let ((results (frequencies data)))
    (format nil "~D ~D ~D ~D"
            (gethash #\A results 0)
            (gethash #\C results 0)
            (gethash #\G results 0)
            (gethash #\T results 0))))

;; (problem-dna "AT")