For instance, the minerals in the nut may help to prevent inflammation and oxidative stress in the brain. Adults were the subjects of some research that revealed how walnuts helped them function better in terms of memory, processing speed, and general mental flexibility.