Hacker News new | ask | show | jobs
by mroth 4107 days ago
Funny, when I attempted this Go Challenge #1 I had the exact same reaction, and halfway through ended up doing a solution in Elixir (which compiles to the Erlang VM) before finishing the Go one.

I think the the particular problem (which by the way was super fun, great work @mattetti!) was really well suited for pattern matching, so like OP I gravitated towards those tools.

I had been keeping my solution private until the contest was over on the 28th, but for sake of comparison of Elixir/Erlang idiomatic code (which should be pretty similar), I'll make my repo public now too (which also contains my Go solution):

https://github.com/mroth/golang-challenge-1

BTW, if you enjoy playing around with reverse engineering, I recommend NOT looking at any of these solutions, and doing the challenge yourself first (in whatever language you want). It was amongst the best of the "code challenge exercises" I've attempted.