Fold for cheap pattern-matching

from blog ring.muhokama.fun, | ↗ original
Summary of a response regarding the encoding of visitors without pattern matching in OCaml, using the fold function.