I never claimed that the answer was wrong. I even said in my post it was a sensible answer!
My claim is that this thing isn't grokking the stuff you send it. If you sent that type of question to something that was a general problem-solver, it would reply with "wtf" or help you, you know, solve the problem you're trying to solve.
It gave you a direct answer and threw in a second example on how arguments work by adding a third one on top of what you requested.
I can’t even count how many times I’ve had to look at example code to figure out how to do something that had nothing to do with the code I was looking at. If I asked it where “const” needed to be placed in a C++ function to effect the whole function and it started to question my motivation I’d not be very happy, “just answer the question, you daffy computer!”
You should post your question on stack overflow and see how that goes.
You asked it the most general question you could think up and it gave a reasonable answer which 100% answered the question.
If someone asked me the same question I’d assume they were just interested in how to construct a function and not making a function that has a specific goal and give a similar answer. It probably learned this from the bazillion stack overflow questions by people who didn’t pay attention in class and are trying to get the interwebs to do their homework for them where people want to help them learn and not finish their homework assignments.
In the context of not <whatever your preconceived notions are> this whole thing is perfect genuous.
Be like complaining that someone used “foo” as a function name instead of looking up the exact function call you wanted.
Ask a vague question get a vague answer, seems reasonable.