From 3264fc74f818d3b92de4d490d59a0ae69edc3944 Mon Sep 17 00:00:00 2001
From: "David A. Madore" <david+git@madore.org>
Date: Tue, 12 Dec 2023 20:52:02 +0100
Subject: Expand last example slightly.

---
 transp-inf110-02-typage.tex | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'transp-inf110-02-typage.tex')

diff --git a/transp-inf110-02-typage.tex b/transp-inf110-02-typage.tex
index 08cf5a9..4a033df 100644
--- a/transp-inf110-02-typage.tex
+++ b/transp-inf110-02-typage.tex
@@ -3518,7 +3518,11 @@ let rec fibonacci\_cps = fun n -> fun k -> if n <= 1 then k n\\
 \ \ \ \ \ \ sum\_cps v1 v2 k)))) ;;\\
 {\color{purple}val fibonacci\_cps : int -> (int -> 'a) -> 'a = <fun>}\\
 fibonacci\_cps 8 (fun x -> x) ;;\\
-{\color{purple}- : int = 21}
+{\color{purple}- : int = 21}\\
+let callcc\_cps = fun g -> fun k -> g (fun v -> fun k0 -> k v) k ;;\\
+(* translation of: callcc (fun kf -> ((kf 42) + 1)) *)\\
+callcc\_cps (fun kf -> fun k -> kf 42 (fun v -> sum\_cps v 1 k)) (fun x -> x) ;;\\
+{\color{purple}- : int = 42}
 \par}
 
 \end{frame}
-- 
cgit v1.2.3

