re: Help me decide a language for Advent of Code VIEW POST

re: Try to follow the advent of code in Elixir forum, they are sharing their solutions there. The solution from m...

they are sharing their solutions there. The solution from member Sneako seems a good one, check it

yeah, I ended with a similar solution - though you can see how more imperative is my code

They are very nice people and will help you in your journey.

Nice to know! I still haven't completely ruled out Clojure :D

I am not doing the advent of code... unfortunately I don't have spare time to dedicate to it.

It's perfectly fine, it's my first time ever!

TIP: while if else exists in Elixir is barely used by a functional programmer. Instead try to use pattern matching in the function heads.

Thanks for the tip. I'll surely read it. I tried to use pattern matching with MapSet.member? as a guard but it wasn't allowed, so I switched to a recursion first and then the if + reduce_while version.

I hope I'll have time to study the language a little better, not just try to butt my head on the wall until I get a decent solution :D

Nice you have been able to figure it out.

Not everything can go in guard clauses. Try to read about them.

I am seeing some doing the advent of code in 2 languages at same time. So why not Elixir and Clojure for solving each day challenge?

No matter what language you want to use for the advent of code would have been good that you had time to prepare for it before, like going through the basics of it.

What worked better for me to left the imperative thinking and adopt the functional programming way was this video course and this book. They are paid but totally worth every cent I paid for them. The author spent a lot of time ensuring that we understand the functional programming paradigm. By the end we have built something useful that we can use in our day to day as developers.

Thank you :-) You're right, I should have gone through at least the tutorial before, but I totally forgot about it :D

code of conduct - report abuse