current status: amazed at how much difference adding `.select { |x| visited.add?(x) }` makes
-
-
Replying to @mountain_ghosts
adventofcode is reminding me how much I love ruby's collections
1 reply 0 retweets 2 likes -
Replying to @mountain_ghosts
today's tip: Set#add? which adds an element and returns true if the element is new to the set (i.e. not equal to existing members)
2 replies 0 retweets 3 likes
Replying to @mountain_ghosts
I tend to like names like `adding` for that kind of API
2:50 PM - 12 Dec 2016
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.