What is call/cc?

前端 未结 11 1098
无人共我
无人共我 2020-12-07 12:55

I\'ve tried several times to grasp the concept of continuations and call/cc. Every single attempt was a failure. Can somebody please explain me these concepts, ideally with

11条回答
  •  春和景丽
    2020-12-07 13:03

    There are multiple levels to understanding call/cc. First you need to understand the terms and the how the mechanism works. Then an understanding of how and when call/cc is used in "real life" programming is needed.

    The first level can be reached by studying CPS, but there are alternatives.

    For the second level I recommend the following classic by Friedman.

    Daniel P. Friedman. "Applications of Continuations: Invited Tutorial". 1988 Principles of Programming Languages (POPL88). January 1988.

提交回复
热议问题