sml: refactor use of parameters in operations