The following code returns
%{"file1" => ~c"\t", "file2" => ~c"\v"}
Why do number 9 and 11 get converted to the corresponding ASCII code ~c"\t" and ~c"\v"? And how can I make 9 and 11 be in the output?
diagnostics = [
%{file: "file1", position: 9},
%{file: "file2", position: 11}
]
diagnostics
|> Enum.group_by(&Map.get(&1, :file), &Map.get(&1, :position))