next up previous contents index
Next: succ Up: Arithmetic Operations Previous: compose   Contents   Start


Adding two numbers: add


(define add (lambda (m n)
   (lambda (f)
      (compose (m f) (n f)))))

This abstraction returns the arithmetic sum of two Church Numerals. The simple abstraction `compose' allows us to elegantly define the abstraction for addition. But that things are not quite as simple as they look is demonstrated in our first appendix. Please refer to a detailed analysis of addition and multiplication using the example: (add two three) and (mult two three). This appendix is found on page [*].

Georg P. Loczewski 2004-03-05


Impressum und Datenschutz