俺Lispã§call/ccã¨æ«å°¾å帰æé©å
æä½ã£ã俺Lispã«call/ccã¨æ«å°¾å帰æé©åãå®è£ ãã¦ã¿ãã
(call/cc (lambda (c) (list 1 (c 2) 3)))
http://kar.s206.xrea.com/lisp/?e=(call%2Fcc%20(lambda%20(c)%20(list%201%20(c%202)%203)))
2
call/ccã®ãã¹ãçµæ
(1 2 3)ã®ãªã¹ããä½ãéä¸ã§æãã¦2ã ãè¿ãã
((Y (lambda (f) (lambda (n) (if (eq? n 0) 'ok (f (- n 1)))))) 99)
http://kar.s206.xrea.com/lisp/?e=((Y%20(lambda%20(f)%20(lambda%20(n)%20(if%20(eq%3F%20n%200)%20%27ok%20(f%20(-%20n%201))))))%2099)
ok
æ«å°¾å帰ã®æé©åã®ãã¹ãçµæ
ããã§ã¯éããªãã®ã§å¼æ°ã99ã«ãããããã£ã¨å¤§ãããã¦ãã¹ã¿ãã¯ãããµããªãã