-
-
Save jmcarp/5274736 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def enum(sofar, new): | |
if len(new) == 0: | |
return sofar | |
else: | |
return enum (sofar + new[0] + 'r', new[1:]) \ | |
+ enum (sofar + new[0] + 'g', new[1:]) \ | |
+ enum (sofar + new[0] + 'b', new[1:]) \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment