Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-42gr6 Total loading time: 0 Render date: 2024-04-19T13:17:23.954Z Has data issue: false hasContentIssue false

5 - Functional programming

Published online by Cambridge University Press:  05 February 2013

Get access

Summary

Functional programming, the use and evaluation of functions as a programming paradigm, has a long and rich history in programming languages. Lisp came about in the search for a convenient language for representing mathematical concepts in programs. It borrowed from the lambda calculus of the logician Alonzo Church. More recent languages have in turn embraced many aspects of Lisp – in addition to Lisp's offspring such as Scheme and Haskell, you will find elements of functional constructs in Java, Python, Ruby, and Perl. Mathematica itself has clear bloodlines to Lisp, including the ability to operate on data structures such as lists as single objects and in its representation of mathematical properties through rules. Being able to express ideas in science, mathematics, and engineering in a language that naturally mirrors those fields is made much easier by the integration of these tools.

Functions not only offer a familiar paradigm to those representing ideas in science, mathematics, and engineering, they provide a consistent and efficient mechanism for computation and programming. In Mathematica, unlike many other languages, functions are considered “first class” objects, meaning they can be used as arguments to other functions, they can be returned as values, and they can be part of many other kinds of data objects such as arrays. In addition, you can create and use functions at runtime, that is, when you evaluate an expression. This functional style of programming distinguishes Mathematica from traditional procedural languages like C and Fortran.

Type
Chapter
Information
Programming with Mathematica®
An Introduction
, pp. 115 - 188
Publisher: Cambridge University Press
Print publication year: 2013

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Functional programming
  • Paul Wellin
  • Book: Programming with <I>Mathematica</I>®
  • Online publication: 05 February 2013
  • Chapter DOI: https://doi.org/10.1017/CBO9780511972942.006
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Functional programming
  • Paul Wellin
  • Book: Programming with <I>Mathematica</I>®
  • Online publication: 05 February 2013
  • Chapter DOI: https://doi.org/10.1017/CBO9780511972942.006
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Functional programming
  • Paul Wellin
  • Book: Programming with <I>Mathematica</I>®
  • Online publication: 05 February 2013
  • Chapter DOI: https://doi.org/10.1017/CBO9780511972942.006
Available formats
×