So I was just working through some of the materials over at HackerRank and I can’t quite figure out what they’re doing. I mean they give you a template
defmodule Solution do
end
And you have to write the code inline in the module, like this:
defmodule Solution do
IO.puts("Hello World")
end
I can’t figure out what it’s doing to get that code to work. It’s not legal Elixir syntax (or is it?) so what’s the trick? I’m not trying to learn anything from HR because I’d like to think I have a good grasp of Elixir already. This strikes me as a poor resource for anyone trying to learn Elixir though.