r/adventofcode • • Dec 04 '15

SOLUTION MEGATHREAD --- Day 4 Solutions ---

--- Day 4: The Ideal Stocking Stuffer ---

Post your solution as a comment. Structure your post like the Day Three thread.

15 Upvotes

272 comments sorted by

View all comments

Show parent comment

1

u/hutsboR Dec 04 '15

I always forget it's possible to match on binaries! In the 8 months~ that I have been working with Elixir I have seen it seldom used. The place where I have seen it used quite extensively is in image libraries.

1

u/profernicus Dec 04 '15

The canonical example off erlang's docs is matching IP datagrams, it's awesome whenever you're doing anything with networking (and communicating with something that might not be just BEAM based, because then it's usually much simpler).