Cognitive function in amyotrophic lateral sclerosis