Skip to content

Commit

Permalink
Use monospaced font for codes (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
EFanZh authored and hmemcpy committed Oct 18, 2018
1 parent 0326f3c commit aeb31cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/1.9/Function Types.tex
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ \section{Exponentials}
specified by a pair of values: one corresponding to \code{False}, and
one corresponding to \code{True}. The set of all possible functions
from \code{Bool} to, say, \code{Int} is the set of all pairs of
\code{Int}s. This is the same as the product $Int \times Int$ or,
being a little creative with notation, $Int^{2}$.
\code{Int}s. This is the same as the product \code{Int} × \code{Int} or,
being a little creative with notation, \code{Int}\textsuperscript{2}.

For another example, let's look at the C++ type \code{char}, which
contains 256 values (Haskell \code{Char} is larger, because Haskell
Expand All @@ -329,7 +329,7 @@ \section{Exponentials}
Booleans: {\small\texttt{bool × bool × bool × ... × bool}}. We know from
arithmetics that an iterated product defines a power. If you
``multiply'' \code{bool} by itself 256 (or \code{char}) times, you
get \code{bool} to the power of \code{char}, or \code{bool\textsuperscript{char}}.
get \code{bool} to the power of \code{char}, or \code{bool}\textsuperscript{\code{char}}.

How many values are there in the type defined as 256-tuples of
\code{bool}? Exactly $2^{256}$. This is also the number
Expand Down

0 comments on commit aeb31cc

Please sign in to comment.