I'm not sure this is the most efficient way to create the TreeMap. `TreeMap.empty ++ chunks` is probably better.