Functional programing in PHP