Converts a function to a property.