   if both heads are the same, advance both
   """
   def distance(<<equal_char::utf8, candidate_tail::binary>>, <<equal_char::utf8, target_tail::binary>>, max_cost, current_cost) do
+    # IO.puts "Both chars same: '#{equal_char}' Advancing both"
     distance(candidate_tail, target_tail, max_cost, current_cost)
   end
 

  two equivalent strings
  """
  def distance(same, same, _max_cost, current_cost) do
    current_cost
  end


  heads are different, but a transposition is in place. advance both and increment cost by 1
  """
  def distance(<<first_char::utf8, second_char::utf8, candidate_tail::binary>>, <<second_char::utf8, first_char::utf8, target_tail::binary>>, max_cost, current_cost) do
    # IO.puts "Transposition seen between #{first_char}#{second_char} and #{second_char}#{first_char}."
    distance(candidate_tail, target_tail, max_cost, current_cost + 1)
  end

  @doc """
  heads are different, assume a substitution OR 1 deletion in either side (an insertion relative to the other side) and return minimum value of all costs.
  Note that this is where runtimes can get hairy in worst cases, there's no TCO here
  """
  def distance(whole_candidate = <<_candidate_head::utf8, candidate_tail::binary>>, whole_target = <<_target_head::utf8, target_tail::binary>>, max_cost, current_cost) do
