Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Variations on a Theme

Name: Anonymous 2009-11-04 1:17

Come up with variations of your favorite toy problems.  The more obfuscated the better.

I'll start with a simple one:

def factorial(n): return reduce(lambda x,y: x*y, range(1,n
+1)) if n > 1 else 1

Name: Anonymous 2009-11-04 2:16

>>3
It's macroexpanded code. I could have easily changed the readtable to downcase the printed symbols, but I had no reason to. If you would have read it more closely, you would know that that code isn't even valid CL code, it's implementation specific code for SBCL. It's the result of macroexpanding that factorial function provided later in the post.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List