The core.match library implements a pattern match compilation algorithm that uses the notion of "necessity" from lazy pattern matching.
core.match