Re: Questions - Higer Order Functions



"rigaha@xxxxxxxxx" <rigaha@xxxxxxxxx> writes:

2. In practice, are functions that return functions used frequently?

Well, this one of course depends on what you are doing. Some
applications find it very helpful to write functions that return other
functions. Loom <http://www.isi.edu/isd/LOOM/> make great use of this
in order to very efficiently compute what were in effect queries by
constructing a program that executed an optimized search over its
knowledge base. In the case of certain defined concepts and relations,
those queries were compiled and stored as compiled functions for future
use.

This also allowed for easy implmentation of a general query facility as
a macro, since a macro can be seen as embodying a function that returns
a function.

--
Thomas A. Russ, USC/Information Sciences Institute
.