I should have known better, but I answered a question too quickly and without fully thinking -- a silly mistake -- and I provided the wrong answer. I realized my mistake moments later and deleted my answer so that I could post the correct answer. I had already been downvoted twice by the time I deleted my answer (it was probably not 3 minutes after I answered)
What is the "proper" action to take if you realize you provided the wrong answer? Should I have instead edited my answer to provide the correct answer rather than deleting it?
For the record, the question was: