Sha256: 926a59014120d99081373680c01863a68802e769c51e86c194f0c8f7576012df

Contents?: true

Size: 568 Bytes

Versions: 69

Compression:

Stored size: 568 Bytes

Contents

defmodule NucleotideCount do
  @nucleotides [?A, ?C, ?G, ?T]

  @doc """
  Counts individual nucleotides in a NucleotideCount strand.

  ## Examples

  iex> NucleotideCount.count('AATAA', ?A)
  4

  iex> NucleotideCount.count('AATAA', ?T)
  1
  """
  @spec count([char], char) :: non_neg_integer
  def count(strand, nucleotide) do
  end

  @doc """
  Returns a summary of counts by nucleotide.

  ## Examples

  iex> NucleotideCount.histogram('AATAA')
  %{?A => 4, ?T => 1, ?C => 0, ?G => 0}
  """
  @spec histogram([char]) :: map
  def histogram(strand) do
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.179 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.178 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.177 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.176 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.175 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.174 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.173 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.172 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.171 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.170 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.169 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.167 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.166 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.165 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.164 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.163 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.162 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.161 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs
trackler-2.2.1.160 tracks/elixir/exercises/nucleotide-count/nucleotide_count.exs