We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35b65d7 commit b6de535Copy full SHA for b6de535
doc/sagittarius/continuations.md
@@ -93,3 +93,27 @@ Otherwise generates one.
93
###### [!Function] `default-continuation-prompt-tag`
94
95
Returns a default continuation prompt tag.
96
+
97
+###### [!Function] `call-with-continuation-barrier` _thunk_
98
99
+Installs a continuation barrier and call _thunk_.
100
101
+A continuation barrier prevents jumps into more deeply nested active
102
+procedure calls:
103
104
+```scheme
105
+((call-with-continuation-barrier
106
+ (lambda ()
107
+ (call/cc values))))
108
+```
109
110
+If a continuation is captured outside of the barrier and escaping
111
+from the _thunk_, it's okay
112
113
114
+(call/cc
115
+ (lambda (k)
116
+ (call-with-continuation-barrier
117
118
+ (k 'ok)))))
119
0 commit comments