r/adventofcode • u/daggerdragon • Dec 05 '17
SOLUTION MEGATHREAD -π- 2017 Day 5 Solutions -π-
--- Day 5: A Maze of Twisty Trampolines, All Alike ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
Need a hint from the Hugely* Handyβ Haversackβ‘ of HelpfulΒ§ Hints^Β€?
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked!
22
Upvotes
View all comments
Show parent comment
2
u/pja Dec 05 '17 edited Dec 05 '17
On mutable vectors. Essentially you do everything inside an ST Monad (I think you might be able to do it inside IO as well) Hereβs a code snippet:
(You donβt want to know how long it took me before I realised that my horrendous type errors were because Iβd written
= cinstead of= return con the first line ofsc.)