From Nand to Tetris, via Scala