Last active
December 29, 2015 06:49
-
-
Save robotlolita/7632081 to your computer and use it in GitHub Desktop.
BEST COMPILER IS BEST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn sum ((xs)) | |
"Returns the sum of all elements in xs." | |
(foldl + 0 xs)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
evaluate({ | |
head: lookup('defn', world), | |
tail: { | |
head: "sum", | |
tail: { | |
head: { | |
head: { | |
head: "xs", | |
tail: nil }, | |
tail: nil }, | |
tail: { | |
head: { | |
tag: "string", | |
value: "Returns the sum of all elements in xs." }, | |
tail: { | |
head: { | |
head: "foldl", | |
tail: { | |
head: "+", | |
tail: { | |
head: 0, | |
tail: { | |
head: "xs", | |
tail: nil } } } }, | |
tail: nil } } } } }, | |
world); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment