Why lambda Is So Important

The ability to pass around functions as if they were just plain old pieces of data is incredibly valuable. Once you get used to doing this, you open up all kinds of conceptual possibilities in the design of your programs. Eventually, your programs will start looking very different from programs in more (dare I say) pedestrian languages, such as Java or C. The name for the style of programming that relies heavily on passing functions as values is called higher-order functional programming. We will look at this style in more detail in Chapter 14.

An even more important reason why Lispers go gaga over lambda is that, as it turns out, in a purely mathematical sense, lambda is actually the only Lisp command there is!

Recall that Lisp is unusual among programming languages in that it was derived directly from a mathematical concept called the lambda calculus. In short, the lambda calculus is a theoretical programming language that contains only one command: the lambda command. By having only this single command and using special code transformations, it’s possible to create a fully functioning (though perhaps not practical) programming language.

The take-home point is that the lambda special form is the most fundamental command in a Lisp system, and the central concept from which other functions in Lisp derive. In fact, it is the central concept from which the very idea of Lisp itself originated.

Now that you have a basic understanding of lambda, you’re ready to tackle some more complicated programming examples that would be hard to write without the anonymous functions this command permits.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.26.22