   HashDict.new [{?A, 4}, {?T, 1}, {?C, 0}, {?G, 0}]
   """
 
-  def nucleotide_counts(nucleotides) do
-    List.foldl(nucleotides, @empty_nucleotide_table, fn(nucleotide, acc) ->
-      HashDict.update(acc, nucleotide, 1, &1+1)
-    end)
+  def nucleotide_counts(strand) do
+    HashDict.new @nucleotides, &({&1, count(strand, &1)})
   end
-
-
-end+end

defmodule DNA do

  @empty_nucleotide_table HashDict.new([{?A, 0}, {?C, 0}, {?G, 0}, {?T, 0}])

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

  1
  """

  def count(strand, nucleotide) do
    Enum.count strand,  &1 == nucleotide
  end


