Advent of Code 2023 - Day 3

Hey everyone! Ukrainian Erlanger checking in :metal:! As the weekend comes to a close, the excitement of solving puzzles on Advent of Code is still going strong! Share your top-notch solutions for Day 3 below!


Day 3

1 Like

Maybe I should give in and have some pre-parsing step :thinking:
Nah :laughing: - my day 3 in Erlang
(I should also pick a formatter, sorry)

I didn’t know that other function arguments are not allowed in the binary pattern size expression in function heads, it needs to be an already bound value, i.e. this doesn’t work:

f(L, <<_:L, $., _/binary>>)

It has to be:

f(L, B) ->
  case B of
    <<_:L, $., _/binary>> ->
1 Like

My day 3 solution in Erlang

1 Like

I’m a little behind, but here is my day 3

1 Like