Bioinformatics/Sequence mutation: Difference between revisions

Content added Content deleted
Line 912: Line 912:


instance Random DNABase where
instance Random DNABase where
randomR (a, b) g = case randomR (fromEnum a, fromEnum b) g of
randomR (a, b) g = case randomR (fromEnum a, fromEnum b) g of (x, y) -> (toEnum x, y)
(x, y) -> (toEnum x, y)
random = randomR (minBound, maxBound)
random = randomR (minBound, maxBound)


instance Random Mutation where
instance Random Mutation where
randomR (a, b) g = case randomR (fromEnum a, fromEnum b) g of
randomR (a, b) g = case randomR (fromEnum a, fromEnum b) g of (x, y) -> (toEnum x, y)
(x, y) -> (toEnum x, y)
random = randomR (minBound, maxBound)
random = randomR (minBound, maxBound)