higher-order lazy evaluation for Cocoa