Objective C tutorial

Learn iPhone programming the dated and not particularly funny way.

@implementation Wind
-(int) Blow {
	int roadCount;
	NSSet allRoads;
	Man man;

	roadCount = 0;
	for (Road aRoad in allRoads) {
		[man walkDown:aRoad];
		if ([man isAMan]) {
			break;
		} else {
			++roadCount;
		}
	}
	return roadCount;
}
@end

@implementation BestClassOfAllTime
-(void) run {
	NSSet allLadies;
	try {
		for (Lady lady in allLadies) {
			if (lady.isSingle) {
				[lady putHand:UP];
			}
		}
	} catch (NSExceptionLiked) {
		throw(exception("Ring not found."));
	}
}
@end

1 thought on “Objective C tutorial”

  1. You know, there has been a distinct lack of good programmer humor in the world lately, and I applaud your work. NSExceptionLiked…genius!

Comments are closed.