This commit is contained in:
2023-10-05 11:23:03 -07:00
parent 18a6856380
commit dfadd23e63
5 changed files with 23 additions and 32 deletions

View File

@ -9,7 +9,7 @@ Design a recursive factorial function using $Y$.
\problem{}
Design a non-recursive factorial function. \par
\note{This one is a lot easier than \ref{Yfac}, but I don't think it will help you solve it.}
\note{This one is easier than \ref{Yfac}, but I don't think it will help you solve it.}
\problem{}
Using pairs, make a \say{list} data structure. Define a GET function, so that $\text{GET}~L~n$ reduces to the nth item in the list.
@ -17,7 +17,7 @@ $\text{GET}~L~0$ should give the first item in the list, and $\text{GET}~L~1$, t
Lists have a defined length, so you should be able to tell when you're on the last element.
\problem{}
Write POW $a$ $b$, which raises $b$ to the $a$th power.
Solve \ref{decrement} without using $H$.
\problem{}
Write a MOD $a$ $b$ function that reduces to the remainder of $a \div b$.
@ -66,7 +66,7 @@ Write a MOD $a$ $b$ function that reduces to the remainder of $a \div b$.
\say{item} is the thing you're storing \par
\say{next...} is another one of these list fragments.
It doesn't matter what \say{next} is in the last list fragment. A dedicated \say{is last} slot allows us to store ANY function in this list.
It doesn't matter what \say{next} is in the last list fragment. A dedicated \say{is last} slot allows us to store arbitrary functions in this list.
\vspace{1ex}