PE1, using higher functions.