Healthy eating habits may preserve cognitive function and reduce the risk of dementia