;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib “htdp-beginner-reader.ss” “lang”)((modname hw4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Problem 2
;; This problem has a partially-completed data design for representing DNA
;; sequences. A DNA molecule is a long sequence of four nucleotides: adenine,
;; cytosine, guanine, and thymine. (More information here:
;; https://en.wikipedia.org/wiki/DNA.)
(define-struct adenine [rest])
(define-struct guanine [rest])
(define-struct cytosine [rest])
(define-struct thymine [rest])
;; A DNASeq is one of:
;; – (make-adenine DNASeq)
;; – (make-guanine DNASeq)
;; – (make-cytosine DNASeq)
;; – (make-thymine DNASeq)
;; – “empty sequence”
;; Interpretation: A DNASeq represents a sequence of nucleotides.
;; Part A
;; Write at least three examples of DNASeq. Across all examples, ensure you
;; have an example of all nucleotides.
;; [TODO] Three
;; Part B
;; Write a template for DNASeq.
;; [TODO] Template
;; Part C
;; Every DNA sequence has a complementary sequence, which substitutes
;; As with Ts, Ts with As, Cs with Gs, and Gs with Cs. Design a function
;; to calculate the complement of a DNA sequence.
;; [TODO] Function design recipe