1 # Example program showing that 'return-continuation-until-mark' can 'pause' a
 2 # function call, returning a continuation, and that calling the continuation
 3 # can 'resume' the paused function call.
 4 #
 5 # Expected output:
 6 #   1
 7 
 8 def main [
 9   local-scope
10   k:continuation <- call-with-continuation-mark create-yielder
11   x:num <- call k  # should return 1
12   $print x 10/newline
13 ]
14 
15 def create-yielder -> n:num [
16   local-scope
17   load-ingredients
18   return-continuation-until-mark
19   return 1
20 ]