On Saturday I was solving a Kattis problem for which I realized that I needed some Haskell code to efficiently compute the conjugate of an integer partition. That is, if we think of a partition as a Ferrers diagram, the conjugate is the partition we get by flipping the diagram along the main diagonal.
I managed to write an efficient implementation, and solve the Kattis problem, simply by thinking hard; but it made me wonder whether one could derive an efficient implementation starting from an obviously-correct yet inefficient specification (via the Bird-Meertens formalism, aka Squiggol). I spent a very pleasant Sunday afternoon trying to work this out and discussing it on Mastodon. I think I'm quite close to having a completely formal derivation; I hope to turn it all into a proper blog post next week.