Skip to content

Instantly share code, notes, and snippets.

View oantolin's full-sized avatar

Omar Antolín Camarena oantolin

View GitHub Profile
@oantolin
oantolin / donttakemoney.py
Created March 25, 2014 14:48
DONT + TAKE = MONEY
ds = set(range(2,10))
for t in ds:
e = 11-t
for n in ds - {t,e}:
for x in [0,1]:
k = 10*x+e-n-1
if k in ds - {t,e,n}:
for o in ds - {t,e,n,k}:
for y in [0,1]:
a = 10*y+n-o-x
(declaim (optimize (speed 3) (safety 0)))
(defmacro with-type (type expr)
(if (atom expr)
expr
(let ((op (car expr)))
(reduce
(lambda (x y)
`(the ,type
(,op ,@(if x (list x) '())