From 7ef19584ac9af6335037790ce1e59172e0ec14fc Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Thu, 16 Sep 2010 21:50:19 -0400 Subject: [PATCH 1/1] fix multiplication Signed-off-by: Jim Pryor --- lists_and_numbers.mdwn | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lists_and_numbers.mdwn b/lists_and_numbers.mdwn index 2f59e263..17b6dfd8 100644 --- a/lists_and_numbers.mdwn +++ b/lists_and_numbers.mdwn @@ -295,12 +295,16 @@ Perhaps not as elegant as addition, but still decently principled. Multiplication is even more elegant. Consider that applying an arbitrary function s to a base value z *m × n* times is a matter of applying s to z *n* times, and then doing that again, and again, and so on...for *m* repetitions. In other words, it's a matter of applying the function (\z. n s z) to z *m* times. In other words, *m × n* can be represented as: -
    \s z. m (\z. n s z) z
-~~> \s z. m n s z
+ \s z. m (\z. n s z) z -which eta-reduces to: +which, doing an eta-reduction and permitting ourselves the `∘` notation, is: + +
\s z. (m ∘ n) s z
+ +and some more eta-reduction gives us: + +
m ∘ n
- m n Isn't that nice? -- 2.11.0