I’m doing an exercise at exercism.io and the function and result is listed below.
I am expected to code the function below to get the result.
NucleotideCount.histogram('AATAA')
# %{?A => 4, ?T => 1, ?C => 0, ?G => 0}
I have no idea how I can get the keys as variables with ? marks in front of them.
I discovered the Enum.fequencies and Enum.frequencies.by functions, and that is as far as I’ve been able to get, and those methods give the codepoint as keys and not the ? representation.
As a side note, is this something elixir programmers would actually do or is this just a code exercise that is slightly off the rails ?