Helping ordinary people create extraordinary websites!

Higher Order Functions

By Jonathan Bartlett
2005-05-13

Using functions for such higher order purposes as arguments, function-generating functions, and anonymous functions
Functions are the wonderful and powerful building blocks of computer programs. Functions allow you to break code down into simpler, more manageable steps. They also allow you to break programs into reusable parts -- parts that are both reusable within the program and in other programs as well. In this article, learn how to create new functions at runtime based on templates, how to create functions that are configurable at runtime using function parameters, and how the Scheme language can be a valuable tool with functions.

In computer programs, functions form the powerful building blocks that allow developers to break code down into simple, more easily managed steps, as well as let programmers break programs into reusable parts. As a nod to the wonderful function, in this article I'll demonstrate how to craft new template-based functions at runtime and explain how to build functions that can be configured at runtime using function parameters.

Examples in this article will use the Scheme programming language and C. An introduction to the Scheme programming language can be found in "Better programming through effective list handling" (developerWorks, January 2005) (see Resources; links to other Scheme introductions and Scheme function references are provided here too).

Let's jump right in and start by creating some functions.



Tutorial pages:

First published by IBM DeveloperWorks


 2 Votes

You might also want to check these out:


Leave a Comment on "Higher Order Functions"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS