(def shef): (def shef 43) Writing a tile-matching game, FP style