   end
 
   @compile {:inline, decompose: 1}
-  defp decompose(str) do
-    chars = graphemes(str)
+  defp decompose(string) do
+    chars = graphemes(string)
     {chars, Kernel.length(chars)}
   end
 

  """

  @spec jaro_distance(t, t) :: 0..1
  def jaro_distance(str1, str2)

  def jaro_distance(str, str), do: 1.0
  def jaro_distance(_str, ""), do: 0.0
  def jaro_distance("", _str), do: 0.0

  def jaro_distance(str1, str2) do
    {chars1, len1} = decompose(str1)
    {chars2, len2} = decompose(str2)

    case match(chars1, len1, chars2, len2) do
      {0, _trans} -> 0.0


  def chunk("", _), do: []

  def chunk(string, trait) when trait in [:valid, :printable] do
    {cp, _} = next_codepoint(string)
    pred_fn = make_chunk_pred(trait)
    do_chunk(string, pred_fn.(cp), pred_fn)
  end

  defp do_chunk(string, flag, pred_fn), do: do_chunk(string, [], <<>>, flag, pred_fn)

  defp do_chunk(<<>>, acc, <<>>, _, _), do: Enum.reverse(acc)

  defp do_chunk(<<>>, acc, chunk, _, _), do: Enum.reverse(acc, [chunk])

  defp do_chunk(string, acc, chunk, flag, pred_fn) do
    {cp, rest} = next_codepoint(string)
    if pred_fn.(cp) != flag do
      do_chunk(rest, [chunk|acc], cp, not flag, pred_fn)
    else
