hws/hw08.tex
changeset 901 33cff35bdc1a
parent 876 771396fa6cc4
child 916 10f834eb0a9e
--- a/hws/hw08.tex	Thu Dec 01 13:07:32 2022 +0000
+++ b/hws/hw08.tex	Fri Dec 02 16:26:20 2022 +0000
@@ -23,13 +23,13 @@
 \texttt{is\_even} and \texttt{is\_odd} tail-recursive?     
 
 \begin{lstlisting}[numbers=none]
-def iseven(n: Int) : Boolean = {
-    if (n == 0) true else isodd(n - 1)
+def is_even(n: Int) : Boolean = {
+    if (n == 0) true else is_odd(n - 1)
 }
 
-def isodd(n: Int) : Boolean = {
+def is_odd(n: Int) : Boolean = {
     if (n == 0) false 
-    else if (n == 1) true else iseven(n - 1)
+    else if (n == 1) true else is_even(n - 1)
 }
 \end{lstlisting}