Final lambda edits
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
\section{Boolean Algebra}
|
||||
|
||||
The Kestrel selects its first argument, and the Kite selects its second. This \say{choosing} behavior is similar to something you may have already seen...
|
||||
The Kestrel selects its first argument, and the Kite selects its second. \par
|
||||
Maybe we can somehow put this \say{choosing} behavior to work...
|
||||
|
||||
\vspace{1ex}
|
||||
|
||||
@ -18,6 +19,14 @@ Write a function $\text{NOT}$ so that $(\text{NOT} ~ T) = F$ and $(\text{NOT}~F)
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
How would \say{if} statements work in this model of boolean logic? \par
|
||||
Say we have a boolean $B$ and two expressions $E_T$ and $E_F$.
|
||||
Can we write a function that evaluates to $E_T$ if $B$ is true, and to $E_F$ otherwise?
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
Write functions $\text{AND}$, $\text{OR}$, and $\text{XOR}$ that satisfy the following table.
|
||||
|
||||
@ -62,5 +71,7 @@ What inputs should it take? What outputs should it produce?
|
||||
$\text{EQ} = \lm ab . [\text{NOT}~(\text{XOR}~a~b)]$
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\pagebreak
|
Reference in New Issue
Block a user