Skip to content

Commit 99540dc

Browse files
KisaragiEffectiveJeffrey Young
andcommitted
Apply suggestions from code review
Co-authored-by: Jeffrey Young <[email protected]>
1 parent fc2b71a commit 99540dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Optimizations/GHC_opt/lambda_lifting.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ Thus |glift| turns into:
3737
.. code-block:: haskell
3838
3939
g_lifted a 0 = a
40-
g_lifted a n = 1 + g_lifted (n - 1)
40+
g_lifted a n = 1 + g_lifted a (n - 1)
4141
4242
Now ``a`` is an input, which means that |glift| can be floated out of ``f``
4343
to the top level producing the final program:
4444

4545
.. code-block:: haskell
4646
47-
g :: Int -> Int -> Int
47+
g_lifted :: Int -> Int -> Int
4848
g_lifted a 0 = a
49-
g_lifted a n = 1 + g_lifted (n - 1)
49+
g_lifted a n = 1 + g_lifted a (n - 1)
5050
5151
f :: Int -> Int -> Int
5252
f a 0 = a

0 commit comments

Comments
 (0)