|
@@ -22229,8 +22229,8 @@ types.
|
|
{\if\edition\pythonEd\pythonColor
|
|
{\if\edition\pythonEd\pythonColor
|
|
%
|
|
%
|
|
In Python, when writing a generic function such as \code{map}, one
|
|
In Python, when writing a generic function such as \code{map}, one
|
|
-does not explicitly write down its generic type (using \code{All}).
|
|
|
|
-Instead, the fact that it is generic is implied by the use of type
|
|
|
|
|
|
+does not explicitly write its generic type (using \code{All}).
|
|
|
|
+Instead, that the function is generic is implied by the use of type
|
|
variables (such as \code{T}) in the type annotations of its
|
|
variables (such as \code{T}) in the type annotations of its
|
|
parameters.
|
|
parameters.
|
|
%
|
|
%
|
|
@@ -23156,7 +23156,7 @@ The source type of the cast is the erasure of $T$, the type $T_s$.
|
|
{\if\edition\racketEd
|
|
{\if\edition\racketEd
|
|
%
|
|
%
|
|
The target type $T_t$ is the result of substituting the argument types
|
|
The target type $T_t$ is the result of substituting the argument types
|
|
-$ts$ for the type parameters $xs$ in $T$ followed by doing type
|
|
|
|
|
|
+$ts$ for the type parameters $xs$ in $T$ and then performing type
|
|
erasure.
|
|
erasure.
|
|
%
|
|
%
|
|
\begin{lstlisting}
|
|
\begin{lstlisting}
|
|
@@ -23171,7 +23171,7 @@ and $s = \LP\code{map}~\code{cons}~xs~ts\RP$.
|
|
{\if\edition\pythonEd\pythonColor
|
|
{\if\edition\pythonEd\pythonColor
|
|
%
|
|
%
|
|
The target type $T_t$ is the result of substituting the deduced
|
|
The target type $T_t$ is the result of substituting the deduced
|
|
-argument types $d$ in $T$ followed by doing type erasure.
|
|
|
|
|
|
+argument types $d$ in $T$ and then performing type erasure.
|
|
%
|
|
%
|
|
\begin{lstlisting}
|
|
\begin{lstlisting}
|
|
Inst(|$e$|, |$d$|)
|
|
Inst(|$e$|, |$d$|)
|