Utility and higher order functions for Objective-C