about summary refs log tree commit diff stats
path: root/html/003trace.test.cc.html
Commit message (Expand)AuthorAgeFilesLines
* 2062Kartik K. Agaram2015-08-231-18/+17
* 1949Kartik K. Agaram2015-08-061-18/+19
* 1925Kartik K. Agaram2015-08-031-1/+1
* 1885Kartik K. Agaram2015-07-291-18/+17
* 1853Kartik K. Agaram2015-07-251-34/+35
* 1690Kartik K. Agaram2015-07-011-0/+5
* 1631 - update html versionsKartik K. Agaram2015-06-231-4/+4
* 1549Kartik K. Agaram2015-06-091-2/+2
* 1517Kartik K. Agaram2015-05-301-3/+3
* 1461 - descriptions/table of contents for the layersKartik K. Agaram2015-05-261-1/+1
* 1459Kartik K. Agaram2015-05-251-86/+32
* 1376 - update github docsKartik K. Agaram2015-05-141-11/+11
* 1291Kartik K. Agaram2015-05-061-1/+1
* 1279 - colorized rendering of the source filesKartik K. Agaram2015-05-061-0/+204
r: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
; 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
])