12.7 Conclusion
The author consulted the following books while writing this chapter. Concepts of Programming Languages [Seb99] provides a comparative study of a large number of programming languages, although Perl is not one of the languages studied. On Lisp, Advanced Techniques for Lisp [Gra94], is a lucidly written book on aspects of Lisp, the primary language used in Artificial Intelligence. It has many wonderful examples of clever use of functions that show programming with functions can be elegant, powerful and fun.
This chapter illustrates that functions can be far from mundane, boring and simple. Functional programming excites a lot of mathematical and computer science researchers and practitioners. In Perl, we can write functions that are close to the mathematical ideal, and use them to achieve complex tasks. Many of the tasks discussed in this chapter can be achieved by without resorting to first-class functions, but others cannot be. The study of the basic concepts of programming, as discussed in many well-regarded text books such as Structure and Interpretation of Computer Programs [ASS99] uses functions generously and as a result uses a functional programming language such as Scheme (a variant of LISP). It is possible that even theoretical purists can be pursuaded to use Perl for an enjoyable and comprehensive discussion of functions, without using an excellent but non-mainstream language like LISP.