The USA didn't learn much from previous invasions by French, British, and Soviet forces.
1. On Vietnam, Bernard B. Fall wrote about the relevant French experience:
"On May 7, 1954, the end of the battle for the jungle fortress of Dien Bien Phu marked the end of French military influence in Asia ...
"On that day in May 1954 it had become apparent by 10 a.m. that Dien Bien Phu’s position was hopeless. French artillery and mortars had been progressively silenced by murderously accurate Communist Viet Minh artillery fire, and the monsoon rains had slowed down supply drops to a trickle and transformed the French trenches and dugouts into bottomless quagmires. The surviving officers and men, many of whom had lived for 54 days on a steady diet of instant coffee and cigarettes, were in a catatonic state of exhaustion ...
"The great battle in the valley of Dien Bien Phu was over. Close to 10,000 captured troops were to begin the grim death march to the Viet Minh prison camps 300 miles to the east. Few would survive. About 2,000 lay dead all over the battlefield in graves left unmarked to this day. Only 73 made good their escape from the various shattered strongpoints to be rescued by the pro-French guerrilla units awaiting them in the Laotian jungle."
Source:
http://www.historynet.com/battle-of-dien-bien-phu.htm2. The British experience in Afghanistan was nicely summarized by Rudyard Kipling:
When you're wounded and left on Afghanistan's plains,
And the women come out to cut up what remains,
Jest roll to your rifle and blow out your brains
Source:
http://www.everypoet.com/archive/poetry/Rudyard_Kipling/kipling_the_young_british_soldier.htm3. The Soviet experience in Afghanistan was discussed in today's Financial Times:
"It was May 1985 when General Igor Rodionov stepped off a military transport aircraft at Kabul airport, assuming command of the Soviet Union's 40th Army fighting in Afghanistan.
"His now-creased face tells the ensuing story better than words. He was the fifth of seven Soviet commanders, sharing a place in history with a singular brotherhood: foreign generals sent to conquer Afghanistan. The line, stretching from Alexander the Great to the present day, is distinguished by one conspicuous characteristic - all ultimately failed.
"In a decade nearly 15,000 Soviet troops lost their lives - and hundreds of thousands of Afghans - in many of the same places that US forces and their allies are struggling to control today: the border regions in the south-east of the country near Pakistan, and the southern provinces of Kandahar and Helmand.
"The war, all 10 years of it, went in circles. We would come and they
would leave. Then we leave, and they would return, Gen Rodionov said."
Source: http://www.ft.com/cms/s/0/333adb8e-de19-11de-b8e2-00144feabdc0.html