Just completed Day 14 of Advent of Code...
Part 2 was, as put elsewhere "not very computer science". And not helped by mixing up my upper and lower half characters for a rather distorted result!
| Stackoverflow | https://stackoverflow.com/users/67392/richard |
| GitHub | https://github.com/richardcox13 |
| Blog | https://blog.rjcox.co.uk |
Just completed Day 14 of Advent of Code...
Part 2 was, as put elsewhere "not very computer science". And not helped by mixing up my upper and lower half characters for a rather distorted result!
But fairly simple. In pt 2 use of named groups made life easier (alternates can use same group), plus Seq.scan to loop the enabled state around made this quite easy.
Then refined regex, so that named groups not needed (but left them in for clarity).