Sha256: 5ad500f56fe17b1dce8b13552c1c824ed1521749a80d4cae0c3908f6ad0b9c4e
Contents?: true
Size: 378 Bytes
Versions: 69
Compression:
Stored size: 378 Bytes
Contents
defmodule RNATranscription do @doc """ Transcribes a character list representing RNATranscription nucleotides to RNA ## Examples iex> RNATranscription.to_rna('ACTG') 'UGAC' """ def to_rna(dna) do Enum.map(dna, &transcribe(&1)) end defp transcribe(?C), do: ?G defp transcribe(?G), do: ?C defp transcribe(?A), do: ?U defp transcribe(?T), do: ?A end
Version data entries
69 entries across 69 versions & 1 rubygems