     |> IO.iodata_to_binary()
 end
 
+rangify = fn [head | tail] ->
+  {first, last, acc} =
+    Enum.reduce(tail, {head, head, []}, fn
+      number, {first, last, acc} when number == first - 1 ->
+        {number, last, acc}
+
+      number, {first, last, acc} ->
+        {number, number, [{first, last} | acc]}
+    end)
+
+  [{first, last} | acc]
+end
+
+acc = {[], [], [], %{}, %{}}
+
 {codes, letters, non_breakable, decompositions, combining_classes} =
-  Enum.reduce(File.stream!(data_path), {[], [], [], %{}, %{}}, fn line, {cacc, lacc, wacc, dacc, kacc} ->
+  Enum.reduce(File.stream!(data_path), acc, fn line, {cacc, lacc, wacc, dacc, kacc} ->
     [
       codepoint,
       _name,


  def downcase(string) when is_binary(string), do: downcase(string, "")

  for codepoint <- letters do
    defp downcase(<<0x03A3::utf8, unquote(codepoint), rest::bits>>, acc) do
      downcase(<<unquote(codepoint), rest::bits>>, <<acc::binary, 0x03C3::utf8>>)
    end
  end
  defp downcase(<<0x03A3::utf8, rest::bits>>, acc) do
    downcase(rest, <<acc::binary, 0x03C2::utf8>>)
  end


    lacc =
      case category do
        "L" <> _ -> [String.to_integer(codepoint, 16) | lacc]
        _ -> lacc
      end

