More on lintegers: - lincrement: try out a variant version by letting zero be its own successor. - Look through the various operations now defined in the DEMO file. Some notes: - laddv1: ((laddv1 lint1) lint2) works by applying lint1 lincrement operations to lint2 - ((compose f g) x) --> f(g(x)). This function applied to the lintegers results in integer multiplication. - Applying lint's to lint's results in reverse-operand exponentiation: (lint1 lint2) --> value of lint2^lint1 All You Need is lambda, Revisited: - It turns out that all you really need to define any function are two specific lambda-defined functions, called S and K. (See the DEMO for these definitions. Also included are some simple functions that are defined with only S and K.) Fixed Point Operator: - Let A be the lambda construction (here, L ==> greek lambda) A = Lxy.y(xxy) In Scheme notation, this just represents (lambda (x) (lambda (y) (y ((xx) y)))) Now consider two applications of A to a function F. This gives AAF = LAF = F(AAF) = F(F(AAF)) = F(F(F(AAF))) = ... To get this recursion to stop, F itself must contain a conditional that handles termination. So, iterative processes are handled by lambda as well. Google for Chicago Journal of Theoretical Computer Science for more information. Notes on the LISP Paper Handout: - There are three notions needed to characterize lists: 1. There are atomic symbols in LISP that are numbers or character strings. These are called S-expressions, where the S stands for symbolic. 2. If e_1 and e_2 are S-expressions, so is e_1.e_2. 3. NIL represents the empty list Together, the first 2 definitions/properties handle the specification of binary trees. The addition of the notion of an empty list recovers the LISP/Scheme notion of nested lists. - M-expressions, where the M stands for meta, are manipulations of S-expressions with an associated value that is an S-expression. M-expressions are to S-expressions as arithmetic formulae are to numbers. - As language representations, they invented cons[e_1;e_2] = (e_1.e_2) car[(e_1.e_2)] = e_1 "contents of address register" (first) cdr[(e_1.e_2)] = e_2 "contents of decrement register" (rest)