I remembered the WFC map generation code I wrote in Koka. I love how concise it is. The longest file is the WFC algorithm itself with 100 lines, and that includes 3 possible functions to choose the next tile (scanlines, first of smallest entropy, random of smallest entropy) and a debug function I could throw out.