On the xkcd site today, the following appeared as a joke in a <script language="scheme"> tag
so what does the following code do / represent?
(define
(eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp)
(lookup-variable-value exp env))
((quoted? exp)
(text-of-quotation exp))
((assignment? exp)
(eval-assignment exp env))
((definition? exp)
(eval-definition exp env))
((if? exp)
(eval-if exp env))
((lambda? exp)
(make-procedure
(lambda-parameters exp)
(lambda-body exp) env))
((begin? exp)
(eval-sequence (begin-actions exp) env))
((cond? exp)
(eval (cond->if exp) env))
((application? exp)
(apply (eval (operator exp) env)
(list-of-values (operands exp) env)))
(else (error "Common Lisp or Netscape Navigator 4.0+ Required" exp))))
What does XKCD stand for? It's not actually an acronym. It's just a word with no phonetic pronunciation -- a treasured and carefully-guarded point in the space of four-character strings.
xkcd: 1000 Comics. [[1000 characters, numerous of which have appeared previously in other comics, are arranged to create the number "1000".
According to Munroe, the comic's name has no particular significance and is simply a four-letter word without a phonetic pronunciation, something he describes as "a treasured and carefully guarded point in the space of four-character strings." In January 2006, the comic was split off into its own website, created in ...
Randall Patrick Munroe (born October 17, 1984) is an American cartoonist, author, and engineer best known as the creator of the webcomic xkcd. Munroe has worked full-time on the comic since late 2006.
It's essentially a simple interpreter, if you assume that all the requisite methods are filled in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With