You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lec_07_other_models.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -722,7 +722,7 @@ As mentioned in [curryingsec](){.ref}, we also use the shorthand $\lambda x,y.e$
722
722
723
723
724
724
725
-
__Equivalence of λ expressions.__ As we have seen in [lambdaexptwoex](){.ref}, the rule that $(\lambda x. exp) exp'$ is equivalent to $exp[x \rightarrow exp']$ enables us to modify λ expressions and obtain simpler _equivalent form_ for them.
725
+
__Equivalence of λ expressions.__ As we have seen in [lambdaexptwoex](){.ref}, the rule that $(\lambda x. exp) exp'$ is equivalent to $exp[x \rightarrow exp']$ enables us to modify λ expressions and obtain a simpler _equivalent form_ for them.
726
726
Another rule that we can use is that the parameter does not matter and hence for example $\lambda y.y$ is the same as $\lambda z.z$.
727
727
Together these rules define the notion of _equivalence_ of λ expressions:
728
728
@@ -739,12 +739,12 @@ Hence the λ calculus naturally implies a computational model.
739
739
Since in the λ calculus the inputs can themselves be functions, we need to decide in what order we evaluate an expression such as
*_Call by name_ (aka _"lazy evaluation"_): We evaluate [lambdaexpeq](){.eqref} by first plugging in the right-hand expression $(\lambda y.g z)$ as input to the left-hand side function, obtaining $f[x \rightarrow (\lambda y.g z)]$ and then continue from there.
747
+
*_Call by name_ (aka _"lazy evaluation"_): We evaluate [lambdaexpeq](){.eqref} by first plugging in the right-hand expression $(\lambda y.g\; z)$ as input to the left-hand side function, obtaining $f[x \rightarrow (\lambda y.g\; z)]$ and then continue from there.
748
748
749
749
*_Call by value_ (aka _"eager evaluation"_): We evaluate [lambdaexpeq](){.eqref} by first evaluating the right-hand side and obtaining $h=g[y \rightarrow z]$, and then plugging this into the left-hand side to obtain $f[x \rightarrow h]$.
750
750
@@ -775,7 +775,7 @@ Prove that the following two expressions $e$ and $f$ are equivalent:
0 commit comments