What's an ecosystem worth — a swamp, a meadow, a bunch of trees? It can be hard to put a value on these kinds of places, which is why so many of them have been bulldozed and turned into things that have more obvious economic value.

But the residents of General MacArthur, a small Philippine community in the path of Super Typhoon Haiyan, probably wouldn't trade their mangrove trees for anything.

The town in Eastern Samar province is named after the American general who defeated the Japanese here in World War II. And now it has another memorable distinction: it largely survived the typhoon that just about leveled the nearby city of Tacloban.

And General MacArthur residents say they have their mangrove trees to thank.

Hundreds of buildings here were damaged by Haiyan’s powerful winds, and many wooden huts were entirely destroyed. But in the town’s public market, on a small bay that opens up into the Pacific Ocean, there’s no sign of the massive flooding that wreaked havoc elsewhere nearby.

Standing on the shore, resident Marianita Calbao says two dots of land about a half-mile out in the bay are part of the reason.

“The islands are there,” she says. “The mangrove area is there.”

MacArthur residents say they owe a lot to that sprawling patch of mangrove trees.

Mangroves form low-lying thickets that hug the shore of coastal areas in tropical regions around the world. They serve as natural barriers that help dissipate swelling storm surges. Mayor Jamie Ty says that protection, combined with a well-executed evacuation plan, meant not one person in MacArthur died in the typhoon.

“We are lucky” Ty says. “We don’t have casualties, although we have a few injuries. But those are just superficial injuries.’’

The storm killed at least 64 people in the next town to the north and more than 5,000 across the Philippines. It’s impossible to know how many of those deaths could have been avoided if other places still had the same natural protective barriers as General MacArthur.

Rough estimates show more than 70 percent of the country’s original mangrove forests were destroyed between 1918 and 1994. Many were replaced with fishponds, resorts and other kinds of coastal development.

But at least some of the mangroves near MacArthur were spared.

“Here, here, and here. The storm surge also hits here,” says University of the Philippines professor Rene Rollon, clicking his mouse over a satellite image of MacArthur and the surrounding islands.

Rollon has studied mangroves for more than 20 years, and he says MacArthur residents are right to thank their humble trees.

“That’s a huge amount of mangroves,” he says. “It dissipates a lot of energy. So, actually, it’s protecting the town.”

In fact many experts consider mangroves one of the best defenses against coastal flooding. That’s why MacArthur officials have designated their mangrove areas a local preservation site.

Many other coastal communities in the Philippines and elsewhere are now trying to replant mangroves from scratch, but experts say many rehabilitation projects here have been slow and poorly implemented. So, for now, MacArthur serves as a rare reminder of the value of natural systems, as the Philippines struggles to regain much of what the country lost to Haiyan.

With its healthy mangrove buffers, that struggle will be far less challenging in MacArthur, where volunteers unload bags of rice, canned meats and instant noodles into a storage room while a group of children plays nearby.

Food remains scarce, the power is still out, and it may take four to six months to repair all that was damaged. But Mayor Ty says he’s optimistic.

“Generally people are calm,” Ty says, “because as far as MacArthur people are concerned, we are all safe.’’