diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-15 00:15:47 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-15 00:15:47 -0800 |
commit | 5059f32d0ddf36b9591ad0c14ee474ad5f2f8816 (patch) | |
tree | ebe215d694644fc519ad1c4dcee499d739138141 /continuation2.mu | |
parent | 1cd833619e355c70d5d96a208cd67ba3a3ccb937 (diff) | |
download | mu-5059f32d0ddf36b9591ad0c14ee474ad5f2f8816.tar.gz |
4160 - named marks for delimited continuations
Hypothesis: this is needed to build McCarthy's amb operator. https://rosettacode.org/wiki/Amb
Diffstat (limited to 'continuation2.mu')
-rw-r--r-- | continuation2.mu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/continuation2.mu b/continuation2.mu index 6906a385..88870957 100644 --- a/continuation2.mu +++ b/continuation2.mu @@ -17,7 +17,7 @@ def main [ l <- push 3, l l <- push 2, l l <- push 1, l - k:continuation <- call-with-continuation-mark create-yielder, l + k:continuation <- call-with-continuation-mark 100/mark, create-yielder, l { x:num, done?:bool <- call k break-if done? @@ -29,7 +29,7 @@ def main [ def create-yielder l:&:list:num -> n:num, done?:bool [ local-scope load-inputs - return-continuation-until-mark + return-continuation-until-mark 100/mark done? <- equal l, 0/nil return-if done?, 0/false n <- first l |