Ver Fonte

fix code example

Peter Thiemann há 3 anos atrás
pai
commit
90f725ff9c
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      book.tex

+ 3 - 3
book.tex

@@ -15800,8 +15800,8 @@ $\Rightarrow$
 % free_var.py
 \begin{lstlisting}
 def f(x : int) -> Callable[[int], int]:
-    y = 4
-    return lambda z: x + y + z
+  y = 4
+  return lambda z: x + y + z
 
 g = f(5)
 h = f(3)
@@ -15817,7 +15817,7 @@ def lambda_0(fvs_1:tuple[bot,int,tuple[int]],z:int) -> int:
 def f(fvs_2:bot, x:int) -> tuple[Callable[[tuple[],int], int]]
   y = (777,)
   y[0] = 4
-  return (lambda_0, y, x)
+  return (lambda_0, x, y)
 
 def main() -> int:
   g = (let clos_3 = (f,) in clos_3[0](clos_3, 5))