chore: typo

This commit is contained in:
Leonardo de Moura 2020-11-29 13:40:49 -08:00
parent dfd1f23030
commit 7a622b2a85

View file

@ -97,7 +97,7 @@ def test (x : Nat) : Nat :=
Now, the message `add1: 2` is printed twice.
It may come as a surprise that it was printed twice instead of three times.
As we pointed out, `dbgTrace!` is a macro used for debugging purposes only,
and `add1` is still considered to be pure function.
and `add1` is still considered to be a pure function.
The Lean compiler performs common subexpression elimination when compiling `double`,
and the produced code for `double` executes `x ()` only once instead of twice.
This transformation is safe because `x : Unit -> Nat` is pure.