Skip to content

Instantly share code, notes, and snippets.

@robotlolita
Last active December 29, 2015 06:49
Show Gist options
  • Save robotlolita/7632081 to your computer and use it in GitHub Desktop.
Save robotlolita/7632081 to your computer and use it in GitHub Desktop.
BEST COMPILER IS BEST
(defn sum ((xs))
"Returns the sum of all elements in xs."
(foldl + 0 xs))
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