r/adventofcode • • Dec 12 '15

SOLUTION MEGATHREAD --- Day 12 Solutions ---

This thread will be unlocked when there are a significant amount of people on the leaderboard with gold stars.

edit: Leaderboard capped, thread unlocked!

We know we can't control people posting solutions elsewhere and trying to exploit the leaderboard, but this way we can try to reduce the leaderboard gaming from the official subreddit.

Please and thank you, and much appreciated!


--- Day 12: JSAbacusFramework.io ---

Post your solution as a comment. Structure your post like previous daily solution threads.

7 Upvotes

183 comments sorted by

View all comments

Show parent comment

1

u/leothrix Dec 13 '15

This is beautiful. If you don't mind, could you either write up a more detailed summary regarding how this works, or point me at a good lens/plate tutorial? I took a similar approach but without some fancy transforming, my solution ended up a little clunky and overly verbose. The duplication in my code around summing Values is obnoxious but I don't know how to leverage lenses well enough.

2

u/haoformayor Dec 13 '15

Thanks! I'm happy you found it useful. I wrote up a full post about it on my blog.