You end up comparing this to an orddict, I wonder if orddict:from_list/1 here would be slightly more future safe.