Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module DNA (nucleotideCounts) where
- import Data.Map (Map)
- countLetters :: String -> Char -> Int
- countLetters str c = length $ filter (== c) str
- nucleotideCounts :: String -> Either String (Map Char Int)
- nucleotideCounts xs = go xs [] where
- go [] acc = Right acc
- go (x:xs) acc = if x `elem` "ACGT" then ???? else Left "error"
Add Comment
Please, Sign In to add comment