The trick to repeating history is you’re supposed to aim for the good parts while avoiding what led to devastating loss of life and resources.
With the 2003 Iraq War, the United States failed to heed this principle by repeating its Vietnam experience in yet another decade-long ground war against a country that posed no threat, lacking a clear objective, exit strategy, or any hope of gaining substantial local support.
By April, 1975, the United States had completely pulled out of Southern Vietnam, and Saigon fell shortly after to Northern Vietnamese forces, reunifying the wartorn country under its brutal communist regime. Domino Theory predicted that the fall of Vietnam would destabilize the region, leading to potential communist takeovers in Thailand, Malaysia, Indonesia, Burma, and India (Laos and Cambodia had already fallen in spillover from the Vietnam War itself). What happened in fact was the communist countries fought each other for the following decade, then eventually decided to normalize relations with the United States to improve their struggling economies (communism has a way of dampening the entrepreneurial spirit).
We have no way of knowing if the Islamic factions attempting to reclaim Iraq in 2014 would follow this pattern, but they do have a remarkable history of fighting each other and would almost certainly tie their own hands doing so for the foreseeable future. Unless the U.S. wants to be permanent babysitter of the region at the expense of trillions of additional dollars, it should repeat what little it got right with Vietnam by getting out and staying out of where it isn’t wanted.