![]() | ![]() | ![]() | Functions - Abstraction and application again | Documentation and user's manual | Table of contents | OCaml programs |
Recall.
First three values:
Then the same values expressed using local definitions:
Now the abstraction step:
Finally the application step (three times):
|
Recall again.
Here the startpoint consists of values of expressions containing applications of functions.
As the abstraction step deals with these functions it leads to a higher-order functional value whose parameters are functional.
First three values:
Then the same values expressed using local definitions:
Now the abstraction step:
Finally the application step (three times):
|
More about higher-order functions.
Here the startpoint consists of functional values. As the abstraction step deals with these functions it leads to a higher-order functional value whose results of applications are functional values. First three values:
Then the same values expressed using local definitions:
Now the abstraction step:
Then the application step (three times):
Finally compare applications of results of applications of this functional value with applications of the initial functional values:
|
Three examples of a function whose applications result in functions (note that the value bound to unary_of_int_add is that in the previous example):
|
In the sequel will also be written higher-order functions whose parameters are functions and whose results of applications are functions, too. |
![]() | ![]() | ![]() | Functions - Abstraction and application again | Documentation and user's manual | Table of contents | OCaml programs |