Skip to content

Instantly share code, notes, and snippets.

@ecarp
ecarp / gist:5268229
Last active December 15, 2015 13:38
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:]) \