<commit_before>﻿module RNATranscription

let dnaToRna = Map.ofSeq [('G', 'C'); ('C', 'G'); ('T', 'A'); ('A', 'U')]

let transpose (input:string) map = new string(input.ToCharArray() |> Array.map (fun c -> Map.find c map))

let toRna (dna:string) = transpose dna dnaToRna<commit_msg>Improved rna-transcription exercise example<commit_after>﻿module RNATranscription

let dnaToRna = 
    function
    | 'G' -> 'C'
    | 'C' -> 'G'
    | 'T' -> 'A'
    | 'A' -> 'U'
    | _   -> invalidOp "Invalid nucleotide"

let toRna = String.map dnaToRna
{'fraction_non_alphanumeric': 0.18773234200743494, 'fraction_numerical': 0.0, 'mean_word_length': 3.6869565217391305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2750008', 'n_tokens_mistral': 221, 'n_tokens_neox': 212, 'n_words': 53}