Replace code with the equivalent function.