Fix formatting issues in eval documentation
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
"source": [
|
||||
"## The core of Lisp: eval \n",
|
||||
"\n",
|
||||
"Here is the core of the interpreter, `eval`. It takes as input an expression, `exp`, and an **environment** that specifies the values of variables. It returns the value of the expression. These few lines are what what [Alan Kay called](https://queue.acm.org/detail.cfm?id=1039523) \"the Maxwell's Equations of Software.\"\n"
|
||||
"Here is the core of the interpreter, `eval`. It takes as input an expression, `exp`, and an **environment** that specifies the values of variables. It returns the value of the expression. These few lines are what [Alan Kay called](https://queue.acm.org/detail.cfm?id=1039523) \"the Maxwell's Equations of Software.\"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -117,7 +117,7 @@
|
||||
" return exp\n",
|
||||
" case Symbol(): # variable evaluates to its value in environment\n",
|
||||
" return env[exp]\n",
|
||||
" case ('define', Symbol(name), val): # definition adds name to the environment\n",
|
||||
" case ('define', Symbol(name), val): # definition adds name to the environment\n",
|
||||
" env[name] = eval(val, env)\n",
|
||||
" return name\n",
|
||||
" case (proc, *args): # procedure call\n",
|
||||
|
||||
Reference in New Issue
Block a user