diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-27 16:01:55 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-27 17:47:59 -0700 |
commit | 6e1eeeebfb453fa7c871869c19375ce60fbd7413 (patch) | |
tree | 539c4a3fdf1756ae79770d5c4aaf6366f1d1525e /arc/callcc.mu | |
parent | 8846a7f85cc04b77b2fe8a67b6d317723437b00c (diff) | |
download | mu-6e1eeeebfb453fa7c871869c19375ce60fbd7413.tar.gz |
5485 - promote SubX to top-level
Diffstat (limited to 'arc/callcc.mu')
-rw-r--r-- | arc/callcc.mu | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/arc/callcc.mu b/arc/callcc.mu deleted file mode 100644 index 20dffeff..00000000 --- a/arc/callcc.mu +++ /dev/null @@ -1,20 +0,0 @@ -; in mu, call-cc (http://en.wikipedia.org/wiki/Call-with-current-continuation) -; is constructed out of a combination of two primitives: -; 'current-continuation', which returns a continuation, and -; 'continue-from', which takes a continuation to - -(function g [ - (c:continuation <- current-continuation) ; <-- loop back to here - (print-character nil:literal/terminal ((#\a literal))) - (reply c:continuation) -]) - -(function f [ - (c:continuation <- g) - (reply c:continuation) -]) - -(function main [ - (c:continuation <- f) - (continue-from c:continuation) ; <-- ..when you hit this -]) |