implement semantic sugar of defining a procedure