Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Unreadable regex chain solution in Creative category for Digit Stack by ale1ster
def digit_stack(cs, s=__import__('re').sub):
fix = lambda f,c,n: c if n == c else fix(f, f(c), c)
return eval('0' + s(r'(\d)', r'+\1', s(r'(POP|PEEK|PUSH\d)', r'',
fix (lambda x: s(r'PUSH(\d)(\d*)PEEK', r'PUSH\1\2\1',
s(r'PUSH(\d)(\d*)POP', r'\1\2', x)), s(' ', '', ''.join(cs)), ''))))
July 3, 2014
Comments: