add exercise of high order function