Quantexa interview question

Several questions about functional programming.