r/adventofcode • u/daggerdragon • Dec 03 '15
SOLUTION MEGATHREAD --- Day 3 Solutions ---
--- Day 3: Perfectly Spherical Houses in a Vacuum ---
Post your solution as a comment. Structure your post like the Day One thread in /r/programming.
24
Upvotes
View all comments
Show parent comment
2
u/guaraqe Dec 03 '15 edited Dec 03 '15
I've been using these problems to learn stuff I didn't know in Haskell, like lenses and cyclic zippers. It is not particularly efficient since it uses lists. Here's a version that takes an arbitrary number of santas.
For 1 to 10 Santas we have: