3 Answers
3

Your edit was rejected because it was a radical change and it was an invalid change. As told in the edit guides you should edit for reasons like this:

to fix grammatical or spelling mistakes

to clarify the meaning of a post without changing it

to correct minor mistakes or add addendums / updates as the post ages

to add related resources or hyperlinks

You made a radical change by extending the current answer with a lot more information. You should (a) create a new answer to the question, refering to the current answer and saying the information you want or (b) you should post it as a comment (linking to some code dump site, because you can't use that much code in a comment). Use b if you it is more a sort of 'sidenote' and use a if it is important and relevant to the question.

As this tells you, you don't have rep to make edits right now that will "take" right away. This also implies what happened, others (with 2K+ rep) rejected your suggested edit.

If you look around meta you'll see a lot of questions regarding suggested edits and why they may be rejected, here for example.

The primary reason your edit was rejected was because it was an invalid edit/drastic change. You doubled the size of the post. When you change an edit this drastically, it's a good bet that you could (and should) just make a new answer out of it.