Created
May 25, 2014 20:59
-
-
Save Ciechan/110cd5eea24222d9a80e to your computer and use it in GitHub Desktop.
This seems to tail call correctly with jmp instead of call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSUInteger)lengthOfListWithHead:(ListNode *)node count:(NSUInteger)count { | |
if (!node) | |
return count; | |
else { | |
__unsafe_unretained id n = node.next; | |
return [self lengthOfListWithHead:n count:(count + 1)]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment