From bfb920ca74d74914598afb8b82e63f6f2b08842b Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 17 Jun 2024 00:23:26 +0200 Subject: [PATCH] Explain parenthesis rules --- Exercises/exercise-7/Lambda.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Exercises/exercise-7/Lambda.hs b/Exercises/exercise-7/Lambda.hs index eeb4d32..b6f0dc7 100644 --- a/Exercises/exercise-7/Lambda.hs +++ b/Exercises/exercise-7/Lambda.hs @@ -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))))