   Constructs a map containing each item in `list`,
   and the number of times each one appears.
   """
+  @spec frequency_table(String.t) :: map
+  @spec frequency_table(list) :: map
+
   def frequency_table(string)
   when is_bitstring(string), do: string |> String.codepoints |> frequency_table
 

  Appends a new letter to `letters`, based on the frequency
  of letters currently in the list.
  """
  def add_letter(letters) do
    case prevailing_freq(letters) do
      :high -> random(@low_freq)

  @doc """
  Generates a list of letters based on the difficulty.
  """
  @spec generate_set(String.t) :: list
  def generate_set(difficulty) do
    letters = generate_player_set(difficulty)
  end

  @spec generate_player_set(String.t) :: list
  def generate_player_set("easy") do
    frequencies(%{high: 5, med: 4, low: 2, pairs: 2}) # 20
  end
