Skip to content

Instantly share code, notes, and snippets.

@ecarp
Last active December 15, 2015 13:38
Show Gist options
  • Save ecarp/5268229 to your computer and use it in GitHub Desktop.
Save ecarp/5268229 to your computer and use it in GitHub Desktop.
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