canonicalize the lambda function definitions