Skip to content

Commit

Permalink
minor fix (#92)
Browse files Browse the repository at this point in the history
* minor fix

* update latex files
  • Loading branch information
winitzki authored Mar 29, 2024
1 parent d2dce7f commit fe671df
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 26 deletions.
2 changes: 1 addition & 1 deletion sofp-src/book_cover/sofp-cover-parameters.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
% -- Ingram: page count MUST be divisible by 2.
% -- Blurb : page count MUST be divisible by 6.
% Add blank pages as needed in final PDF generations!
\pgfmathsetmacro\TotalPageCount{1293}% Must be manually entered
\pgfmathsetmacro\TotalPageCount{TOTALPAGES}% Must be manually entered
\pgfmathsetmacro\PaperWidthPt{7.444in}%
\pgfmathsetmacro\PaperHeightPt{9.68in}%

Expand Down
43 changes: 26 additions & 17 deletions sofp-src/sofp-curry-howard.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -21834,43 +21834,52 @@ The function
\begin_inset Formula $f$
\end_inset

cannot use its argument of type
\begin_inset Formula $A$
\end_inset
must return the fixed value
\begin_inset listings
inline true
status open

since nothing is known about the type
\begin_inset Formula $A$
\end_inset
\begin_layout Plain Layout

()
\end_layout

.
So, the code of
\begin_inset Formula $f$
\end_inset


\emph on
must
\emph default
discard its argument and return the fixed value
of type
\begin_inset listings
inline true
status open

\begin_layout Plain Layout

()
Unit
\end_layout

\end_inset

of type
.
The argument of type
\begin_inset Formula $A$
\end_inset

is of no use for that.
So, the code of
\begin_inset Formula $f$
\end_inset


\emph on
must
\emph default
discard its argument and return the value
\begin_inset listings
inline true
status open

\begin_layout Plain Layout

Unit
()
\end_layout

\end_inset
Expand Down
9 changes: 5 additions & 4 deletions sofp-src/sofp-curry-howard.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3159,10 +3159,11 @@ \subsubsection{Example \label{subsec:ch-Example-type-identity-2}\ref{subsec:ch-E
\begin{lstlisting}
def f[A]: A => Unit = { _ => () }
\end{lstlisting}
The function $f$ cannot use its argument of type $A$ since nothing
is known about the type $A$. So, the code of $f$ \emph{must} discard
its argument and return the fixed value \lstinline!()! of type \lstinline!Unit!.
In the code notation, this function is written as:
The function $f$ must return the fixed value \lstinline!()! of type
\lstinline!Unit!. The argument of type $A$ is of no use for that.
So, the code of $f$ \emph{must} discard its argument and return the
value \lstinline!()!. In the code notation, this function is written
as:
\[
f^{:A\rightarrow\bbnum 1}\triangleq\_\rightarrow1\quad.
\]
Expand Down
2 changes: 1 addition & 1 deletion sofp-src/sofp-disjunctions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ \subsubsection{Example \label{subsec:Disjunction-Example-Option-getOrElse}\ref{s
may be written as:
\begin{lstlisting}
sealed trait Either[A, B]
final case class Left[A, B](value: A) extends Either[A, B]
final case class Left[A, B](value: A) extends Either[A, B]
final case class Right[A, B](value: B) extends Either[A, B]
\end{lstlisting}
By convention, a value \lstinline!Left(x)! represents an error, and
Expand Down
6 changes: 3 additions & 3 deletions sofp-src/sofp.tex
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@
{\footnotesize{}ISBN (e-book): 978-0-359-76877-6}\\
{\footnotesize{}ISBN: 978-0-359-76877-6}\\
\\
{\scriptsize{}Source hash (sha256): 96d583d77c94d2bde34571964e809e523a86f343dbb7b8c928f44946847ec8d1}\\
{\scriptsize{}Git commit: a5f7c30bdfaee2a339f4c0df21394d29d83b7279}\\
{\scriptsize{}PDF file built on Fri, 29 Mar 2024 18:05:57 +0100 by pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023) on Darwin}\\
{\scriptsize{}Source hash (sha256): 95955e7292d5e9d345cf3eabf587f153e515088c3257f8e8f6aba6aa82b6d06e}\\
{\scriptsize{}Git commit: d15dfa33120f0de2742919a74050a5d1adb88be3}\\
{\scriptsize{}PDF file built on Fri, 29 Mar 2024 19:01:28 +0100 by pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023) on Darwin}\\
~\\
{\scriptsize{}Permission is granted to copy, distribute and/or modify
this document under the terms of the GNU Free Documentation License,
Expand Down

0 comments on commit fe671df

Please sign in to comment.