Skip to content

Instantly share code, notes, and snippets.

@jmcarp
Forked from ecarp/gist:5268229
Created March 30, 2013 00:49
Show Gist options
  • Save jmcarp/5274736 to your computer and use it in GitHub Desktop.
Save jmcarp/5274736 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