December 2021
Beginner
840 pages
47h 29m
English
A callback is simply a reference to a function, which is typically used to return control flow back to another part of the program. The concept of a callback is related to continuation-passing style. Consider the following Scheme program in direct style:
The main program (lines 6–8) calls addWord (to add a word to the dictionary; line 7), followed by getDictionnaire (to get the dictionary; line 8). The following is the rendering of this program in CPS using a callback:
This expression uses CPS without ...