Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify wording of "Functions as First-Class Values" #1290

Merged
merged 1 commit into from
Nov 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ A defining characteristic of functional programming languages is the elevation o

Typical measures of first-class status include the following:

- Can you bind an identifier to the value? That is, can you give it a name?
- Can you bind functions to identifiers? That is, can you give them names?

- Can you store the value in a data structure, such as a list?
- Can you store functions in data structures, such as in a list?

- Can you pass the value as an argument in a function call?
- Can you pass a function as an argument in a function call?

- Can you return the value as the value of a function call?
- Can you return a function from a function call?

The last two measures define what are known as *higher-order operations* or *higher-order functions*. Higher-order functions accept functions as arguments and return functions as the value of function calls. These operations support such mainstays of functional programming as mapping functions and composition of functions.

Expand Down Expand Up @@ -204,4 +204,4 @@ The following code contains all the examples in this topic.

[`let` Bindings](../language-reference/functions/let-bindings.md)

[Lambda Expressions: The `fun` Keyword](../language-reference/functions/lambda-expressions-the-fun-keyword.md)
[Lambda Expressions: The `fun` Keyword](../language-reference/functions/lambda-expressions-the-fun-keyword.md)