Replace sub-terms with zipper-based implementation