Explain parenthesis rules
This commit is contained in:
parent
7b20e2a047
commit
bfb920ca74
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@ pretty x = case x of
|
|||
--------------------
|
||||
-- Exercise 2
|
||||
--------------------
|
||||
-- Rule 1: Function bodies in (L{param}.{body}) span as much as possible:
|
||||
-- Lx.A B C == Lx.(A B C)
|
||||
-- Rule 2: Function invocations (application) are left bound
|
||||
-- A B C == ((A B) C)
|
||||
|
||||
-- ((Lx.(x z)) (Ly.(x y)))
|
||||
-- ((Lx.(x z)) (Ly.(w (Lw.(((w y) z) x)))))
|
||||
-- (Lx.((x y) (Lx.(y x))))
|
||||
|
|
Loading…
Reference in a new issue