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.
6 # $ git clone https://github.com/akkartik/mu
8 # $ ./mu continuation1.mu
15 k:continuation <- call-with-continuation-mark 100/mark, create-yielder
16 x:num <- call k # should return 1
20 def create-yielder -> n:num [
23 return-continuation-until-mark 100/mark