I don’t know Erlang, but for this particular exercise, the tests indicate that single char strings are used to represent letters. That’s how they’ve chosen to represent them when writing the tests, and that’s perfectly fine.
Note that using strings for letters comes directly from the problem specs, but each track is free to use whatever they believe it is more appropriate. For example, in Clojure we use characters (\A) instead of strings (“A”).
A single letter is really a “codepoint” or integer which represents the letter. the string notation, “…”, is a shortcut for a list of codepoints, so things like:
exactly what I have thought about Erlang. This means the diamond-Exercise is not idiomatic Erlang. Because: If a function expects a List, but only uses the Head of the List, why the function than not simply expect a single value?
So, the Erlang-Track is simply automated from the problem specs without finetune. Good to know.
@NobbZ is probably the best person on the forum that could comment to how idiomatic the problem and solution are. I’m not sure how active @Nobbz is right now, but I’ll leave it for them to comment