The Bindlib library provides support for free and bound variables in the OCaml language.
Bindlib
Functorial interface used to build lifting functions (i.e., functions that permute the 'a bindbox type with another type constructor) for any type equipped with a map function.
'a bindbox
map
Similar to the Lift functor, but handles "binary" map functions.
Lift