|
|
Classes and objects |
Due to (1) the first class status of functions, and due to (2) the use of static binding of free names, it is possible to interpret a closure as an object With this interpretation, it is possible to regard certain function definitions as classes |
|
On this page we have also defined the syntactical convenience function send that sends a message to an object. In Racket be sure that you define send before Point (such that send in the add method refers to our send , and not an already existing and unrelated definition of
the name send ). |
The function apply calls a function
on a list of parameters. This should be seen in contrast to a normal call, in which the individual parameters
are passed. |
|