![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Simulation of other Paradigms and Continuations - slide 33 : 43 |
The implicite continuation of a function is turned into an explicit parameter
Every function takes an extra parameter: A continuation which is a function of a single parameter
No function returns normally
![]() | A function programmed in both direct style and continuation passing style. |
![]() | The same functions programmed in continuation passing style. |
![]() | The tail recursive factorial function - in direct and continuation passing style. |
![]() | An iterative list-length function - continuation passing style - handling improper lists. |