Sha256: 86fd165bf7227cc9846f86ae14b95724a9e96f56fa46c842c7996e388d0eaeb6

Contents?: true

Size: 377 Bytes

Versions: 327

Compression:

Stored size: 377 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

327 entries across 327 versions & 1 rubygems

Version Path
trackler-2.2.1.109 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.108 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.107 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.106 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.105 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.104 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.103 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.102 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.101 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.100 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.99 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.98 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.97 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.96 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.95 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.94 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.93 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.92 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.91 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.90 tracks/elixir/exercises/rna-transcription/example.exs