libmx provides a framework for dealing with (extended and optionally typed) lambda calculus expressions. Among other features, it provides a template instantiation machine for evaluating the value of a lambda calculus expression, a template instantiation machine for evaluating the Hindley-Milner type of an lambda calculus expression, and reference counter-based memory management for lambda calculus expressions and types.