Sha256: 8c38c7f5046646e2adf34cee3f258830db136dc32fe6c726a164c0627ede4a3d
Contents?: true
Size: 513 Bytes
Versions: 273
Compression:
Stored size: 513 Bytes
Contents
module NucleoTideCount let private validNucleotides = ['A'; 'T'; 'C'; 'G'] let private isValid nucleotide = List.contains nucleotide validNucleotides let count (nucleotide:char) (strand:string) = match isValid nucleotide with | true -> Seq.fold (fun acc elem -> if elem = nucleotide then acc + 1 else acc) 0 strand | false -> failwith "Invalid nucleotide" let nucleotideCounts strand = List.map (fun nucleotide -> (nucleotide, count nucleotide strand)) validNucleotides |> Map.ofSeq
Version data entries
273 entries across 273 versions & 1 rubygems