Higher-order functions edits