summary refs log tree commit diff stats
path: root/test/stuff
Commit message (Expand)AuthorAgeFilesLines
* moved/fixed testshut2009-12-116-0/+236
id=89f05122714037c78bc8d67518fe711d7caef969'>^
7d2c2d55 ^
a407e90e ^











1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20






                                                                              
                                                        











                                                                     
; 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
])