Determining if an expression represents a function or not