]> gitweb.factorcode.org Git - factor.git/blob - extra/partial-continuations/partial-continuations-docs.factor
mason: show git SHA1 and timestamp of last completed build
[factor.git] / extra / partial-continuations / partial-continuations-docs.factor
1 IN: partial-continuations
2 USING: help.markup help.syntax kernel ;
3
4 HELP: breset
5 { $values { "quot" { $quotation ( r -- v ) } } }
6 { $description "Marks the boundary of the partial continuation. The quotation has stack effect " { $snippet "( r -- v )" } ", where " { $snippet "r" } " identifies the " { $link breset } " in scope and should be passed to " { $link bshift } " to mark the boundary of the continuation." }
7 { $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ;
8
9 HELP: bshift
10 { $values { "r" "the " { $link breset } " in scope" } { "quot" { $quotation ( pcc -- v ) } } }
11 { $description "Calls the quotation with the partial continuation on the stack. The quotation should have stack effect " { $snippet "( pcc -- v )" } ". The partial continuation can be called with " { $link call } " and has stack effect " { $snippet "( a -- b )" } "." }
12 { $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ;
13
14 ARTICLE: "partial-continuations" "Partial continuations"
15 "Based on Scheme code for bshift and breset from "
16 { $url "http://groups.google.com/group/comp.lang.scheme/msg/9f0d61da01540816" } "."
17 " See this blog entry for more details:"
18 { $url "http://www.bluishcoder.co.nz/2006/03/factor-partial-continuation-updates.html" }
19 { $subsections
20     breset
21     bshift
22 } ;
23
24 ABOUT: "partial-continuations"