#include #include @protocol Job -do; @end @interface MyJob : Object -do; @end @implementation MyJob -do { printf("Doing Job\n"); return self; } @end @interface JobExecutor : Object -doWith: (id)job for: (int)count; @end @implementation JobExecutor -doWith: (id)job for: (int)count { for (int i = 0; i < count; ++i) { [job do]; } return self; } @end