private void rewrite(
		final TreeMatchResult<V> result,
		final TreeNode<V> tree
	) {
		final Map<Var<V>, Tree<V, ?>> vars = result.vars();
		final TreeNode<V> r = _right.expand(vars);

		final Path path = result.tree().childPath();
		tree.replaceAtPath(path, r);
	}
Maps {@code this} rewrite rule from type {@code V} to type {@code B}.

@param mapper the type mapper
@param <B> the target type
@return a new rewrite rule for the mapped type
@throws NullPointerException if the {@code mapper} is {@code null}
jenetics.ext/src/main/java/io/jenetics/ext/rewriting/TreeRewriteRule.java