Eating walnuts for breakfast could improve brain function throughout the day for young adults, a new study has shown.