# Detecting whether a function is initially defined with the form R[x,y] or R[x_,y_], etc

I have a very long code that may have errors in definition of functions and I want to trace these errors.

Is there any attribute or function to detect whether a function is initially defined in the form of function[x_,y_] or function[x,y] or any other form without searching to find the place of initial definition?

• Look at DownValues[function]? Dec 4 '21 at 19:45
• That's great! Can I modify this attribute for functions? For example I have a function defined in the form W[x,y] within an expression and I want to temporary change the definition form of it to W[x_,y_] for a special use. @MarcoB Dec 4 '21 at 19:53
• Look also at the color of the function name. Undeclared names are blue. Dec 4 '21 at 20:20