From a40a72a07392dfa97f710d9d80b86288252ba040 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Wed, 13 Dec 2023 16:01:16 +0100 Subject: Add a few call/cc puzzles. --- transp-inf110-02-typage.tex | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/transp-inf110-02-typage.tex b/transp-inf110-02-typage.tex index b60778b..389acbe 100644 --- a/transp-inf110-02-typage.tex +++ b/transp-inf110-02-typage.tex @@ -3379,9 +3379,26 @@ $\rightarrow$ 42\\ (call/cc (lambda (k) (+ (k 42) 1)))\hfill ;; (+ \_ 1) never reached\\ $\rightarrow$ 42\\ (* (call/cc (lambda (k) (k 42))) 2)\hfill ;; Nothing weird here\\ -$\rightarrow$ 84 +$\rightarrow$ 84\\ +((call/cc (lambda (k) k))\\ +\ (call/cc (lambda (k) k)))\hfill ;; Endless loop: why? \par} +\bigskip + +{\footnotesize + +Très difficile à comprendre : + +{\tt +((lambda (yin)\\ +\ \ \ ((lambda (yang) (yin yang))\\ +\ \ \ \ ((lambda (kk) (display \#\textbackslash *) kk) (call/cc (lambda (k) k)))))\\ +\ ((lambda (kk) (newline) kk) (call/cc (lambda (k) k)))) +\par} + +} + \end{frame} % \begin{frame} -- cgit v1.2.3