From 4e3d5fa3419b600be6d691d43901191a8be5444b Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 9 Nov 2022 21:44:32 -0800 Subject: [PATCH] Fixed a macro bug --- macros.lamb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macros.lamb b/macros.lamb index de78894..16a2cf1 100644 --- a/macros.lamb +++ b/macros.lamb @@ -31,7 +31,7 @@ # Misc Combinators M = λx.(x x) W = (M M) -Y = λf.((λx.(f (x x))) (λx.(f (x x)))) +Y = λf.( (λx.(f (x x))) (λx.(f (x x))) ) # Booleans @@ -67,11 +67,11 @@ XOR = λab.((a (NOT b)) b) # `Y FAC 6` required 867,920 reductions and took 10 minutes to run. PAIR = λabi.(i a b) -H = λp.((PAIR (p F)) (S (p F))) S = λnfa.(f (n f a)) -D = λn.((n H) ((PAIR 0) 0) T) +H = λp.((PAIR (p F)) (S (p F))) +D = λn.(n H (PAIR 0 0) T) Z = λn.(n (λa.F) T) NZ = λn.(n (λa.T) F) ADD = λmn.(m S n) MULT = λnmf.(n (m f)) -FAC = λyn.( (Z n)(1)((MULT n) (y (D n))) ) \ No newline at end of file +FAC = λyn.(Z n) (1) (MULT n (y (D n))) \ No newline at end of file