EPAM Systems interview question

javascript currying and higher order functions