First-class function

First-Class Function

First-class function

to get instant updates about 'First-Class Function' on your MyPage. Meet other similar minded people. Its Free!


All Updates

In computer science, a programming language is said to have first-class functions if it treats function as first-class objects. Specifically, this means that the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some authors require support for anonymous functions as well. The term was coined by Christopher Strachey in the context of “functions as first-class citizens” in the mid-1960s.Rod Burstall, "Christopher Strachey—Understanding Programming Languages", Higher-Order and Symbolic Computation 13:52 (2000)

These features are a necessity for the functional programming style, in which (for instance) the use of higher-order functions is a standard practice. A simple example of a higher-ordered function is the map or mapcar function, which takes as its arguments a function and a list, and returns the list formed by applying the function to each member of the list. For a language to support map, it must support passing a function as an argument.

There are certain implementation difficulties in passing functions as arguments and returning them as results, especially in the presence of non-local variables introduced in......
Read More

No feeds found

Posting your question. Please wait!...

No updates available.
No messages found
Suggested Pages
Tell your friends >
about this page
 Create a new Page
for companies, colleges, celebrities or anything you like.Get updates on MyPage.
Create a new Page
 Find your friends
  Find friends on MyPage from