Disclosed herein are methods of improving cognitive function in a patient as measured by, for example, improvement in score on a validated scale that measures cognitive function, such as the Behavior Rating Inventory of Executive Function (BRIEF), by administering the test to a patient and obtaining a pre-treatment test score, treating the patient with fenfluramine or its pharmaceutically acceptable salt, and after treatment, re-administering the test of cognitive function to the patient and obtaining a post-treatment score, to allow observation of an improvement in the test score. In some embodiments, the patient is also being treated for the symptoms of epilepsy.