r/adventofcode • u/daggerdragon • Dec 07 '17
SOLUTION MEGATHREAD -๐- 2017 Day 7 Solutions -๐-
--- Day 7: Recursive Circus ---
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!
10
Upvotes
View all comments
Show parent comment
2
u/[deleted] Dec 08 '17 edited Dec 08 '17
you cant have a scriptblock/expression in the middle of a pipe, only to start, so i don think thatll work as suggested, and if you begin/process/end it like that, might as well just make it a filter-function like i didedit: OH! i see what you did. yes!!!! i can!!
worked perfect!
passthru is one of the best things on a function that does work on an object :)
yeah, this one took most of the day on/off at times. first stab was ugly ugly ugly until it finally worked, then was able to rework into a usable pipeline. the reverse was the biggest killer, trying to figure out how to "do it all in one"
so yeah, the reverse is /kinda/ cheating cause it restarts the pipeline effectively, but eh... ;)
i had one version with add-member and a bunch of scriptmethods and attempts at recursive scriptmethods and it was just a clusterfuck of slowness, couldnt hardly debug it :)