
Lets start with a some arbitrary function and convert it from how youd see it in a math book or C program to how it would look in LISP. (This will be just enough to make you dangerous.) What follows will be a crash course in LISP. l is the anonymous function in l-calculus, and lambda is the anonymous function in LISP. l-calculus preceded LISP and LISP drew from it to some extent. L-calculus is a calculus which expresses computation via anonymous functions.
Fotomagico 4.5.2 code#
An attempt will then be made to use l-calculus as a programming language in its own right to code a popular function in an effort to show the clean, algebraic-like properties of l-calculus and to consider (in a small way) if l-calculus might serve as a light unto the footsteps to guide the way to computing without gratuitous complexity. This article will introduce l-calculus and combinators, and show some similarity between l-calculus and the programming language LISP. It has no concept of Turing machine style state, and it has some very nice algebraic-like properties. There is however, another model, equally as powerful, that is quite different. If something is computable on a Turing machine, it is considered computable if something isnt computable on a Turing machine its considered uncomputable. Most people have heard of the Turing machine, as its now tantamount to being the measuring stick by which computability is judged. Wouldnt it be nice to be able to manipulate computer code in the same sort of clean mathematical way that one does algebra? Usually computer code is too ad hoc to allow much of that, but what if we had a super clean model that we could work with? Even if such a model wasnt practical, it would certainly still be interesting, and what could be found out from it might be mappable back into computer languages which dont have as neat a set of algebraic-like properties. Such tutorialness should not be taken as an insult to anyones intelligence. Note to the Überprogrammer and disclaimer: I will be endeavoring to write so simply that everyone should be able to get something out of this article. People who like this sort of thing will find that this is the sort of thing they like. Abe Lincoln ∺ Calculus for the Algebraic-like Manipulation of Computer Code, or Why Oh Why Oh Y? Lambda Calculus Volume Number: 7 Issue Number: 5 Column Tag: Lisp Listenerīy André van Meulebrouck, Chatsworth, CA\
