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.49 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.48 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.47 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.46 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.45 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.44 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.43 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.42 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.41 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.40 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.39 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.38 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.37 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.36 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.35 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.34 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.33 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.32 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.31 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.30 tracks/elixir/exercises/rna-transcription/example.exs