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.29 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.28 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.27 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.26 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.25 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.24 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.23 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.22 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.21 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.20 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.19 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.18 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.17 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.16 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.15 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.14 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.13 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.12 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.11 tracks/elixir/exercises/rna-transcription/example.exs
trackler-2.2.1.10 tracks/elixir/exercises/rna-transcription/example.exs