Onor.io
Hacker Rank And Elixir
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.
Most Liked
joaoevangelista
Well it is legal, but it will be executed during compilation, not something you can easily assert.
They don’t give you the name of the function and which parameters it should have? It is in neither the tests provided? (I don’t remember if they provide some).
If you like to learn solving these puzzles I prefer Codewars. If not a great resource to hands on learning is Exercism
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









