Well back to Haskell today, although not 100% sure this was a good choice. The problem being that updating an ever growing floor map in part 2 meant that after about 50 iterations it starts to get pretty slow. So much so I had to add some prints, inititally, to check it was actually making progress. However, it was and it kindly got to the right answer. Another issue was that as I'd choosen to use a map that used the position as a key, which for me were complex numbers, then i had to convert to string and back, as Haskell won't allow "real" numbers to have order defined that is needed for maps, at least I could not resolve that issue. Ahh well it still worked out pretty nicely, if not a little on the slow side.
Well back to Haskell today, although not 100% sure this was a good choice. The problem being that updating an ever growing floor map in part 2 meant that after about 50 iterations it starts to get pretty slow. So much so I had to add some prints, inititally, to check it was actually making progress. However, it was and it kindly got to the right answer. Another issue was that as I'd choosen to use a map that used the position as a key, which for me were complex numbers, then i had to convert to string and back, as Haskell won't allow "real" numbers to have order defined that is needed for maps, at least I could not resolve that issue. Ahh well it still worked out pretty nicely, if not a little on the slow side.